diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-07-25 00:17:30 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-07-25 00:17:30 +0000 |
commit | d8d0aa019bc89e7cdc9c9c0ebd4f7e398d5248fe (patch) | |
tree | 2051a8dfcf134db13e0d71b7b3fb13abb60db5c8 /src/backend | |
parent | 8e2647a1452449efe0c5fc531e6fa66dc6f2efe4 (diff) | |
download | postgresql-d8d0aa019bc89e7cdc9c9c0ebd4f7e398d5248fe.tar.gz postgresql-d8d0aa019bc89e7cdc9c9c0ebd4f7e398d5248fe.zip |
Update psql help syntax to remove <> and uppercaese keywords.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/parser/gram.y | 54 |
1 files changed, 11 insertions, 43 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 6d5f1a3d250..74aa97fcb7b 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.16 1998/07/24 03:31:23 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.17 1998/07/25 00:17:28 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -175,6 +175,7 @@ Oid param_type(int t); /* used in parse_expr.c */ join_using %type <boolean> opt_union %type <boolean> opt_table +%type <boolean> opt_trans %type <node> position_expr %type <list> extract_list, position_list @@ -1994,74 +1995,41 @@ ListenStmt: LISTEN relation_name * *****************************************************************************/ -TransactionStmt: ABORT_TRANS TRANSACTION +TransactionStmt: ABORT_TRANS opt_trans { TransactionStmt *n = makeNode(TransactionStmt); n->command = ABORT_TRANS; $$ = (Node *)n; } - | BEGIN_TRANS TRANSACTION + | BEGIN_TRANS opt_trans { TransactionStmt *n = makeNode(TransactionStmt); n->command = BEGIN_TRANS; $$ = (Node *)n; } - | BEGIN_TRANS WORK - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = BEGIN_TRANS; - $$ = (Node *)n; - } - | COMMIT WORK + | COMMIT opt_trans { TransactionStmt *n = makeNode(TransactionStmt); n->command = END_TRANS; $$ = (Node *)n; } - | END_TRANS TRANSACTION + | END_TRANS opt_trans { TransactionStmt *n = makeNode(TransactionStmt); n->command = END_TRANS; $$ = (Node *)n; } - | ROLLBACK WORK - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = ABORT_TRANS; - $$ = (Node *)n; - } - - | ABORT_TRANS + | ROLLBACK opt_trans { TransactionStmt *n = makeNode(TransactionStmt); n->command = ABORT_TRANS; $$ = (Node *)n; } - | BEGIN_TRANS - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = BEGIN_TRANS; - $$ = (Node *)n; - } - | COMMIT - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = END_TRANS; - $$ = (Node *)n; - } + ; - | END_TRANS - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = END_TRANS; - $$ = (Node *)n; - } - | ROLLBACK - { - TransactionStmt *n = makeNode(TransactionStmt); - n->command = ABORT_TRANS; - $$ = (Node *)n; - } +opt_trans: WORK { $$ = NULL; } + | TRANSACTION { $$ = NULL: } + | /*EMPTY*/ { $$ = NULL; } ; |