summaryrefslogtreecommitdiff
path: root/src/backend/nodes/equalfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-09-22 23:43:43 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-09-22 23:43:43 +0000
commit9048b73184b6852b71faf4481b75ab5850a9cd1b (patch)
tree445092b67a93cf16300f72e41f14d8ad3443188f /src/backend/nodes/equalfuncs.c
parentd5a43ffde068d67409b494d812bd7e9f514db29c (diff)
Implement the DO statement to support execution of PL code without having
to create a function for it. Procedural languages now have an additional entry point, namely a function to execute an inline code block. This seemed a better design than trying to hide the transient-ness of the code from the PL. As of this patch, only plpgsql has an inline handler, but probably people will soon write handlers for the other standard PLs. In passing, remove the long-dead LANCOMPILER option of CREATE LANGUAGE. Petr Jelinek
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r--src/backend/nodes/equalfuncs.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 6c75f2e2747..d7ed08cc68b 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -22,7 +22,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.360 2009/07/30 02:45:37 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.361 2009/09/22 23:43:38 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1213,6 +1213,14 @@ _equalRemoveFuncStmt(RemoveFuncStmt *a, RemoveFuncStmt *b)
}
static bool
+_equalDoStmt(DoStmt *a, DoStmt *b)
+{
+ COMPARE_NODE_FIELD(args);
+
+ return true;
+}
+
+static bool
_equalRemoveOpClassStmt(RemoveOpClassStmt *a, RemoveOpClassStmt *b)
{
COMPARE_NODE_FIELD(opclassname);
@@ -1667,6 +1675,7 @@ _equalCreatePLangStmt(CreatePLangStmt *a, CreatePLangStmt *b)
{
COMPARE_STRING_FIELD(plname);
COMPARE_NODE_FIELD(plhandler);
+ COMPARE_NODE_FIELD(plinline);
COMPARE_NODE_FIELD(plvalidator);
COMPARE_SCALAR_FIELD(pltrusted);
@@ -2576,6 +2585,9 @@ equal(void *a, void *b)
case T_RemoveFuncStmt:
retval = _equalRemoveFuncStmt(a, b);
break;
+ case T_DoStmt:
+ retval = _equalDoStmt(a, b);
+ break;
case T_RemoveOpClassStmt:
retval = _equalRemoveOpClassStmt(a, b);
break;