summaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_proc.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/catalog/pg_proc.h
parentafa8f1971ae57b4d5091f77717f666d365545867 (diff)
downloadpostgresql-44b928e876b06ba6801ec2c60d2cd914a2185c5d.tar.gz
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/catalog/pg_proc.h')
-rw-r--r--src/include/catalog/pg_proc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 824f7a3fba..7b78e78fcc 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.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/catalog/pg_proc.h,v 1.389 2005/11/17 22:14:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.390 2006/01/08 07:00:25 neilc Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -3617,6 +3617,8 @@ DATA(insert OID = 2508 ( pg_get_constraintdef PGNSP PGUID 12 f f t f s 2 25 "26
DESCR("constraint description with pretty-print option");
DATA(insert OID = 2509 ( pg_get_expr PGNSP PGUID 12 f f t f s 3 25 "25 26 16" _null_ _null_ _null_ pg_get_expr_ext - _null_ ));
DESCR("deparse an encoded expression with pretty-print option");
+DATA(insert OID = 2510 ( pg_prepared_statement PGNSP PGUID 12 f f t t s 0 2249 "" _null_ _null_ _null_ pg_prepared_statement - _null_ ));
+DESCR("get the prepared statements for this session");
/* non-persistent series generator */
DATA(insert OID = 1066 ( generate_series PGNSP PGUID 12 f f t t v 3 23 "23 23 23" _null_ _null_ _null_ generate_series_step_int4 - _null_ ));