summaryrefslogtreecommitdiff
path: root/src/include/utils/builtins.h
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2006-01-08 07:00:27 +0000
committerNeil Conway <neilc@samurai.com>2006-01-08 07:00:27 +0000
commit44b928e876b06ba6801ec2c60d2cd914a2185c5d (patch)
treee15760f3f86aae4f3e782954b699444e2a1f4bc0 /src/include/utils/builtins.h
parentafa8f1971ae57b4d5091f77717f666d365545867 (diff)
Add a new system view, pg_prepared_statements, that can be used to
access information about the prepared statements that are available in the current session. Original patch from Joachim Wieland, various improvements by Neil Conway. The "statement" column of the view contains the literal query string sent by the client, without any rewriting or pretty printing. This means that prepared statements created via SQL will be prefixed with "PREPARE ... AS ", whereas those prepared via the FE/BE protocol will not. That is unfortunate, but discussion on -patches did not yield an efficient way to improve this, and there is some merit in returning exactly what the client sent to the backend. Catalog version bumped, regression tests updated.
Diffstat (limited to 'src/include/utils/builtins.h')
-rw-r--r--src/include/utils/builtins.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 4d1349917ca..97fbfdc341e 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.268 2005/11/22 18:17:32 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/builtins.h,v 1.269 2006/01/08 07:00:26 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -861,4 +861,7 @@ extern Datum pg_prepared_xact(PG_FUNCTION_ARGS);
/* catalog/pg_conversion.c */
extern Datum pg_convert_using(PG_FUNCTION_ARGS);
+/* commands/prepare.c */
+extern Datum pg_prepared_statement(PG_FUNCTION_ARGS);
+
#endif /* BUILTINS_H */