diff options
author | Jan Wieck | 2000-09-05 20:25:14 +0000 |
---|---|---|
committer | Jan Wieck | 2000-09-05 20:25:14 +0000 |
commit | daf1e3a7026e367d630be3ac34ac0a9e7cf1340f (patch) | |
tree | 88420f149500bb3205f390fc7e3c42907e0e66b9 /src/include | |
parent | d7f1e110267de738499ec6dc8b7cf6443e8c3a67 (diff) |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/pg_proc.h | 7 | ||||
-rw-r--r-- | src/include/utils/builtins.h | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index c7e092c7020..04109473d8e 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 2c42899b1c0..cbb0aabe498 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 */ |