diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_language.h | 16 | ||||
-rw-r--r-- | src/include/catalog/pg_pltemplate.h | 24 | ||||
-rw-r--r-- | src/include/commands/defrem.h | 3 | ||||
-rw-r--r-- | src/include/nodes/nodes.h | 6 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 22 | ||||
-rw-r--r-- | src/include/parser/kwlist.h | 4 | ||||
-rw-r--r-- | src/include/utils/guc.h | 4 |
8 files changed, 56 insertions, 27 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index e162aa71076..5e0fc241549 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.538 2009/09/01 03:53:08 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.539 2009/09/22 23:43:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200908311 +#define CATALOG_VERSION_NO 200909221 #endif diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index dd8d35e830d..dff946b4119 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.34 2009/01/01 17:23:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.35 2009/09/22 23:43:41 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -35,6 +35,7 @@ CATALOG(pg_language,2612) bool lanispl; /* Is a procedural language */ bool lanpltrusted; /* PL is trusted */ Oid lanplcallfoid; /* Call handler for PL */ + Oid laninline; /* Optional anonymous-block handler function */ Oid lanvalidator; /* Optional validation function */ aclitem lanacl[1]; /* Access privileges */ } FormData_pg_language; @@ -50,27 +51,28 @@ typedef FormData_pg_language *Form_pg_language; * compiler constants for pg_language * ---------------- */ -#define Natts_pg_language 7 +#define Natts_pg_language 8 #define Anum_pg_language_lanname 1 #define Anum_pg_language_lanowner 2 #define Anum_pg_language_lanispl 3 #define Anum_pg_language_lanpltrusted 4 #define Anum_pg_language_lanplcallfoid 5 -#define Anum_pg_language_lanvalidator 6 -#define Anum_pg_language_lanacl 7 +#define Anum_pg_language_laninline 6 +#define Anum_pg_language_lanvalidator 7 +#define Anum_pg_language_lanacl 8 /* ---------------- * initial contents of pg_language * ---------------- */ -DATA(insert OID = 12 ( "internal" PGUID f f 0 2246 _null_ )); +DATA(insert OID = 12 ( "internal" PGUID f f 0 0 2246 _null_ )); DESCR("built-in functions"); #define INTERNALlanguageId 12 -DATA(insert OID = 13 ( "c" PGUID f f 0 2247 _null_ )); +DATA(insert OID = 13 ( "c" PGUID f f 0 0 2247 _null_ )); DESCR("dynamically-loaded C functions"); #define ClanguageId 13 -DATA(insert OID = 14 ( "sql" PGUID f t 0 2248 _null_ )); +DATA(insert OID = 14 ( "sql" PGUID f t 0 0 2248 _null_ )); DESCR("SQL-language functions"); #define SQLlanguageId 14 diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h index 9775133ceb5..2065a5332bb 100644 --- a/src/include/catalog/pg_pltemplate.h +++ b/src/include/catalog/pg_pltemplate.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.7 2009/01/01 17:23:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.8 2009/09/22 23:43:41 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -34,6 +34,7 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS bool tmpltrusted; /* PL is trusted? */ bool tmpldbacreate; /* PL is installable by db owner? */ text tmplhandler; /* name of call handler function */ + text tmplinline; /* name of anonymous-block handler, or NULL */ text tmplvalidator; /* name of validator function, or NULL */ text tmpllibrary; /* path of shared library */ aclitem tmplacl[1]; /* access privileges for template */ @@ -50,14 +51,15 @@ typedef FormData_pg_pltemplate *Form_pg_pltemplate; * compiler constants for pg_pltemplate * ---------------- */ -#define Natts_pg_pltemplate 7 +#define Natts_pg_pltemplate 8 #define Anum_pg_pltemplate_tmplname 1 #define Anum_pg_pltemplate_tmpltrusted 2 #define Anum_pg_pltemplate_tmpldbacreate 3 #define Anum_pg_pltemplate_tmplhandler 4 -#define Anum_pg_pltemplate_tmplvalidator 5 -#define Anum_pg_pltemplate_tmpllibrary 6 -#define Anum_pg_pltemplate_tmplacl 7 +#define Anum_pg_pltemplate_tmplinline 5 +#define Anum_pg_pltemplate_tmplvalidator 6 +#define Anum_pg_pltemplate_tmpllibrary 7 +#define Anum_pg_pltemplate_tmplacl 8 /* ---------------- @@ -65,11 +67,11 @@ typedef FormData_pg_pltemplate *Form_pg_pltemplate; * ---------------- */ -DATA(insert ( "plpgsql" t t "plpgsql_call_handler" "plpgsql_validator" "$libdir/plpgsql" _null_ )); -DATA(insert ( "pltcl" t t "pltcl_call_handler" _null_ "$libdir/pltcl" _null_ )); -DATA(insert ( "pltclu" f f "pltclu_call_handler" _null_ "$libdir/pltcl" _null_ )); -DATA(insert ( "plperl" t t "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ )); -DATA(insert ( "plperlu" f f "plperl_call_handler" "plperl_validator" "$libdir/plperl" _null_ )); -DATA(insert ( "plpythonu" f f "plpython_call_handler" _null_ "$libdir/plpython" _null_ )); +DATA(insert ( "plpgsql" t t "plpgsql_call_handler" "plpgsql_inline_handler" "plpgsql_validator" "$libdir/plpgsql" _null_ )); +DATA(insert ( "pltcl" t t "pltcl_call_handler" _null_ _null_ "$libdir/pltcl" _null_ )); +DATA(insert ( "pltclu" f f "pltclu_call_handler" _null_ _null_ "$libdir/pltcl" _null_ )); +DATA(insert ( "plperl" t t "plperl_call_handler" _null_ "plperl_validator" "$libdir/plperl" _null_ )); +DATA(insert ( "plperlu" f f "plperl_call_handler" _null_ "plperl_validator" "$libdir/plperl" _null_ )); +DATA(insert ( "plpythonu" f f "plpython_call_handler" _null_ _null_ "$libdir/plpython" _null_ )); #endif /* PG_PLTEMPLATE_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 4396a497385..89bb227a90f 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.96 2009/07/29 20:56:20 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.97 2009/09/22 23:43:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -61,6 +61,7 @@ extern void DropCast(DropCastStmt *stmt); extern void DropCastById(Oid castOid); extern void AlterFunctionNamespace(List *name, List *argtypes, bool isagg, const char *newschema); +extern void ExecuteDoStmt(DoStmt *stmt); /* commands/operatorcmds.c */ extern void DefineOperator(List *names, List *parameters); diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 6be4bf39598..d842c9c3199 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.225 2009/09/17 20:49:29 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.226 2009/09/22 23:43:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -274,6 +274,7 @@ typedef enum NodeTag T_CreateFunctionStmt, T_AlterFunctionStmt, T_RemoveFuncStmt, + T_DoStmt, T_RenameStmt, T_RuleStmt, T_NotifyStmt, @@ -388,7 +389,8 @@ typedef enum NodeTag T_TriggerData = 950, /* in commands/trigger.h */ T_ReturnSetInfo, /* in nodes/execnodes.h */ T_WindowObjectData, /* private in nodeWindowAgg.c */ - T_TIDBitmap /* in nodes/tidbitmap.h */ + T_TIDBitmap, /* in nodes/tidbitmap.h */ + T_InlineCodeBlock /* in nodes/parsenodes.h */ } NodeTag; /* diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index f0b3941abf8..1ce28b77541 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.401 2009/08/02 22:14:53 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.402 2009/09/22 23:43:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1570,6 +1570,7 @@ typedef struct CreatePLangStmt NodeTag type; char *plname; /* PL name */ List *plhandler; /* PL call handler function (qual. name) */ + List *plinline; /* optional inline function (qual. name) */ List *plvalidator; /* optional validator function (qual. name) */ bool pltrusted; /* PL is trusted */ } CreatePLangStmt; @@ -1923,6 +1924,25 @@ typedef struct RemoveFuncStmt } RemoveFuncStmt; /* ---------------------- + * DO Statement + * + * DoStmt is the raw parser output, InlineCodeBlock is the execution-time API + * ---------------------- + */ +typedef struct DoStmt +{ + NodeTag type; + List *args; /* List of DefElem nodes */ +} DoStmt; + +typedef struct InlineCodeBlock +{ + NodeTag type; + char *source_text; /* source text of anonymous code block */ + Oid langOid; /* OID of selected language */ +} InlineCodeBlock; + +/* ---------------------- * Drop Operator Class Statement * ---------------------- */ diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h index 23f5d87a7a6..d1fd91795b6 100644 --- a/src/include/parser/kwlist.h +++ b/src/include/parser/kwlist.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/include/parser/kwlist.h,v 1.2 2009/04/06 08:42:53 heikki Exp $ + * $PostgreSQL: pgsql/src/include/parser/kwlist.h,v 1.3 2009/09/22 23:43:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -187,6 +187,7 @@ PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD) PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD) PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD) PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD) +PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD) PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD) PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD) PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD) @@ -204,7 +205,6 @@ PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD) PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD) PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD) PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD) -PG_KEYWORD("lancompiler", LANCOMPILER, UNRESERVED_KEYWORD) PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD) PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD) PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD) diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 6f4acdef701..435a722aa0b 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -7,7 +7,7 @@ * Copyright (c) 2000-2009, PostgreSQL Global Development Group * Written by Peter Eisentraut <peter_e@gmx.net>. * - * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.104 2009/09/03 22:08:05 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.105 2009/09/22 23:43:41 tgl Exp $ *-------------------------------------------------------------------- */ #ifndef GUC_H @@ -178,6 +178,8 @@ extern char *HbaFileName; extern char *IdentFileName; extern char *external_pid_file; +extern char *default_do_language; + extern int tcp_keepalives_idle; extern int tcp_keepalives_interval; extern int tcp_keepalives_count; |