summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.h4
-rw-r--r--src/include/executor/spi_priv.h9
-rw-r--r--src/include/postgres_ext.h4
-rw-r--r--src/include/tcop/pquery.h5
-rw-r--r--src/include/utils/elog.h8
5 files changed, 21 insertions, 9 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index f3b70f31ec7..9112d9df9da 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.320 2004/02/14 20:16:17 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.321 2004/03/21 22:29:11 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -3533,4 +3533,6 @@ extern Oid ProcedureCreate(const char *procedureName,
extern void check_sql_fn_retval(Oid rettype, char fn_typtype,
List *queryTreeList);
+extern bool function_parse_error_transpose(const char *prosrc);
+
#endif /* PG_PROC_H */
diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h
index 6c5c19994d5..dcafa1ccb9a 100644
--- a/src/include/executor/spi_priv.h
+++ b/src/include/executor/spi_priv.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/spi_priv.h,v 1.17 2003/11/29 22:41:01 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/executor/spi_priv.h,v 1.18 2004/03/21 22:29:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,11 +27,10 @@ typedef struct
typedef struct
{
- /*
- * context containing _SPI_plan itself as well as subsidiary
- * structures
- */
+ /* Context containing _SPI_plan itself as well as subsidiary data */
MemoryContext plancxt;
+ /* Original query string (used for error reporting) */
+ const char *query;
/* List of List of querytrees; one sublist per original parsetree */
List *qtlist;
/* List of plan trees --- length == # of querytrees, but flat list */
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h
index 235895c61f1..8f235f698d1 100644
--- a/src/include/postgres_ext.h
+++ b/src/include/postgres_ext.h
@@ -15,7 +15,7 @@
* use header files that are otherwise internal to Postgres to interface
* with the backend.
*
- * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.14 2003/11/29 22:40:53 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.15 2004/03/21 22:29:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,6 +59,8 @@ typedef unsigned int Oid;
#define PG_DIAG_MESSAGE_DETAIL 'D'
#define PG_DIAG_MESSAGE_HINT 'H'
#define PG_DIAG_STATEMENT_POSITION 'P'
+#define PG_DIAG_INTERNAL_POSITION 'p'
+#define PG_DIAG_INTERNAL_QUERY 'q'
#define PG_DIAG_CONTEXT 'W'
#define PG_DIAG_SOURCE_FILE 'F'
#define PG_DIAG_SOURCE_LINE 'L'
diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h
index baba06438ff..e2efd3d5e30 100644
--- a/src/include/tcop/pquery.h
+++ b/src/include/tcop/pquery.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/tcop/pquery.h,v 1.30 2003/11/29 22:41:14 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/tcop/pquery.h,v 1.31 2004/03/21 22:29:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,6 +17,9 @@
#include "utils/portal.h"
+extern DLLIMPORT Portal ActivePortal;
+
+
extern void ProcessQuery(Query *parsetree,
Plan *plan,
ParamListInfo params,
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index f71881547eb..24db6696e66 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.66 2004/03/15 15:56:28 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.67 2004/03/21 22:29:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -132,6 +132,12 @@ __attribute__((format(printf, 1, 2)));
extern int errfunction(const char *funcname);
extern int errposition(int cursorpos);
+extern int internalerrposition(int cursorpos);
+extern int internalerrquery(const char *query);
+
+extern int geterrposition(void);
+extern int getinternalerrposition(void);
+
/*----------
* Old-style error reporting API: to be used in this way: