From daf1e3a7026e367d630be3ac34ac0a9e7cf1340f Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Tue, 5 Sep 2000 20:25:14 +0000 Subject: Added functions quote_ident(text) returns text quote_literal(text) returns text These are handy to build up properly quoted query strings for the new PL/pgSQL EXECUTE functionality to submit dynamic DDL statements. Jan --- src/include/catalog/pg_proc.h | 7 ++++++- src/include/utils/builtins.h | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index c7e092c702..04109473d8 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.164 2000/08/24 03:29:08 tgl Exp $ + * $Id: pg_proc.h,v 1.165 2000/09/05 20:25:13 wieck Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -2409,6 +2409,11 @@ DESCR("convert text to timestamp"); DATA(insert OID = 1780 ( to_date PGUID 12 f t f t 2 f 1082 "25 25" 100 0 0 100 to_date - )); DESCR("convert text to date"); +DATA(insert OID = 1282 ( quote_ident PGUID 12 f t t t 1 f 25 "25" 100 0 0 100 quote_ident - )); +DESCR("quote an identifier for usage in a querystring"); +DATA(insert OID = 1283 ( quote_literal PGUID 12 f t t t 1 f 25 "25" 100 0 0 100 quote_literal - )); +DESCR("quote a literal for usage in a querystring"); + DATA(insert OID = 1798 ( oidin PGUID 12 f t t t 1 f 26 "0" 100 0 0 100 oidin - )); DESCR("(internal)"); DATA(insert OID = 1799 ( oidout PGUID 12 f t t t 1 f 23 "0" 100 0 0 100 oidout - )); diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 2c42899b1c..cbb0aabe49 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.135 2000/08/25 18:05:53 tgl Exp $ + * $Id: builtins.h,v 1.136 2000/09/05 20:25:14 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -585,4 +585,8 @@ extern Datum format_type(PG_FUNCTION_ARGS); extern Datum oidvectortypes(PG_FUNCTION_ARGS); extern int32 type_maximum_size(Oid type_oid, int32 typemod); +/* quote.c */ +extern Datum quote_ident(PG_FUNCTION_ARGS); +extern Datum quote_literal(PG_FUNCTION_ARGS); + #endif /* BUILTINS_H */ -- cgit v1.2.1