diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-10-07 00:58:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-10-07 00:58:23 +0000 |
commit | fbd26d69846fcbfb69deee45bdddcc692dd59b07 (patch) | |
tree | 2aee8f89268d64645b1c4c96958a0e575a12e259 /src/backend/nodes/equalfuncs.c | |
parent | 4837270be9cbba925a7003de5980918c3de8fb37 (diff) | |
download | postgresql-fbd26d69846fcbfb69deee45bdddcc692dd59b07.tar.gz postgresql-fbd26d69846fcbfb69deee45bdddcc692dd59b07.zip |
Arrange that no database accesses are attempted during parser() --- this
took some rejiggering of typename and ACL parsing, as well as moving
parse_analyze call out of parser(). Restructure postgres.c processing
so that parse analysis and rewrite are skipped when in abort-transaction
state. Only COMMIT and ABORT statements will be processed beyond the raw
parser() phase. This addresses problem of parser failing with database access
errors while in aborted state (see pghackers discussions around 7/28/00).
Also fix some bugs with COMMIT/ABORT statements appearing in the middle of
a single query input string.
Function, operator, and aggregate arguments/results can now use full
TypeName production, in particular foo[] for array types.
DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators.
Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index ab8779cb375..d5b2ff4607e 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -20,7 +20,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.75 2000/10/05 19:11:27 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.76 2000/10/07 00:58:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -753,24 +753,10 @@ _equalAlterTableStmt(AlterTableStmt *a, AlterTableStmt *b) static bool _equalChangeACLStmt(ChangeACLStmt *a, ChangeACLStmt *b) { - if (a->aclitem && b->aclitem) - { - if (a->aclitem->ai_id != b->aclitem->ai_id) - return false; - if (a->aclitem->ai_idtype != b->aclitem->ai_idtype) - return false; - if (a->aclitem->ai_mode != b->aclitem->ai_mode) - return false; - } - else - { - if (a->aclitem != b->aclitem) - return false; /* one NULL, one not */ - } - if (a->modechg != b->modechg) - return false; if (!equal(a->relNames, b->relNames)) return false; + if (!equalstr(a->aclString, b->aclString)) + return false; return true; } @@ -956,7 +942,7 @@ _equalProcedureStmt(ProcedureStmt *a, ProcedureStmt *b) { if (!equalstr(a->funcname, b->funcname)) return false; - if (!equal(a->defArgs, b->defArgs)) + if (!equal(a->argTypes, b->argTypes)) return false; if (!equal(a->returnType, b->returnType)) return false; @@ -975,7 +961,7 @@ _equalRemoveAggrStmt(RemoveAggrStmt *a, RemoveAggrStmt *b) { if (!equalstr(a->aggname, b->aggname)) return false; - if (!equalstr(a->aggtype, b->aggtype)) + if (!equal(a->aggtype, b->aggtype)) return false; return true; |