mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
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.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.115 2000/10/05 19:11:36 tgl Exp $
|
||||
* $Id: parsenodes.h,v 1.116 2000/10/07 00:58:21 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -114,9 +114,8 @@ typedef struct AlterTableStmt
|
||||
typedef struct ChangeACLStmt
|
||||
{
|
||||
NodeTag type;
|
||||
struct AclItem *aclitem;
|
||||
unsigned modechg;
|
||||
List *relNames;
|
||||
char *aclString;
|
||||
} ChangeACLStmt;
|
||||
|
||||
/* ----------------------
|
||||
@@ -488,10 +487,8 @@ typedef struct ProcedureStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *funcname; /* name of function to create */
|
||||
List *defArgs; /* list of definitions a list of strings
|
||||
* (as Value *) */
|
||||
Node *returnType; /* the return type (as a string or a
|
||||
* TypeName (ie.setof) */
|
||||
List *argTypes; /* list of argument types (TypeName nodes) */
|
||||
Node *returnType; /* the return type (a TypeName node) */
|
||||
List *withClause; /* a list of DefElem */
|
||||
List *as; /* definition of function body */
|
||||
char *language; /* C, SQL, etc */
|
||||
@@ -505,7 +502,7 @@ typedef struct RemoveAggrStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *aggname; /* aggregate to drop */
|
||||
char *aggtype; /* for this type */
|
||||
Node *aggtype; /* TypeName for input datatype, or NULL */
|
||||
} RemoveAggrStmt;
|
||||
|
||||
/* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user