Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8d0aa0

Browse files
committed
Update psql help syntax to remove <> and uppercaese keywords.
1 parent8e2647a commitd8d0aa0

File tree

4 files changed

+156
-199
lines changed

4 files changed

+156
-199
lines changed

‎src/backend/parser/gram.y

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.16 1998/07/24 03:31:23 scrappy Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.17 1998/07/25 00:17:28 momjian Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -175,6 +175,7 @@ Oidparam_type(int t); /* used in parse_expr.c */
175175
join_using
176176
%type <boolean>opt_union
177177
%type <boolean>opt_table
178+
%type <boolean>opt_trans
178179

179180
%type <node>position_expr
180181
%type <list>extract_list, position_list
@@ -1994,74 +1995,41 @@ ListenStmt: LISTEN relation_name
19941995
*
19951996
*****************************************************************************/
19961997

1997-
TransactionStmt:ABORT_TRANSTRANSACTION
1998+
TransactionStmt: ABORT_TRANSopt_trans
19981999
{
19992000
TransactionStmt *n = makeNode(TransactionStmt);
20002001
n->command = ABORT_TRANS;
20012002
$$ = (Node *)n;
20022003
}
2003-
| BEGIN_TRANSTRANSACTION
2004+
| BEGIN_TRANSopt_trans
20042005
{
20052006
TransactionStmt *n = makeNode(TransactionStmt);
20062007
n->command = BEGIN_TRANS;
20072008
$$ = (Node *)n;
20082009
}
2009-
| BEGIN_TRANS WORK
2010-
{
2011-
TransactionStmt *n = makeNode(TransactionStmt);
2012-
n->command = BEGIN_TRANS;
2013-
$$ = (Node *)n;
2014-
}
2015-
| COMMIT WORK
2010+
| COMMIT opt_trans
20162011
{
20172012
TransactionStmt *n = makeNode(TransactionStmt);
20182013
n->command = END_TRANS;
20192014
$$ = (Node *)n;
20202015
}
2021-
| END_TRANSTRANSACTION
2016+
| END_TRANSopt_trans
20222017
{
20232018
TransactionStmt *n = makeNode(TransactionStmt);
20242019
n->command = END_TRANS;
20252020
$$ = (Node *)n;
20262021
}
2027-
| ROLLBACK WORK
2028-
{
2029-
TransactionStmt *n = makeNode(TransactionStmt);
2030-
n->command = ABORT_TRANS;
2031-
$$ = (Node *)n;
2032-
}
2033-
2034-
| ABORT_TRANS
2022+
| ROLLBACK opt_trans
20352023
{
20362024
TransactionStmt *n = makeNode(TransactionStmt);
20372025
n->command = ABORT_TRANS;
20382026
$$ = (Node *)n;
20392027
}
2040-
| BEGIN_TRANS
2041-
{
2042-
TransactionStmt *n = makeNode(TransactionStmt);
2043-
n->command = BEGIN_TRANS;
2044-
$$ = (Node *)n;
2045-
}
2046-
| COMMIT
2047-
{
2048-
TransactionStmt *n = makeNode(TransactionStmt);
2049-
n->command = END_TRANS;
2050-
$$ = (Node *)n;
2051-
}
2028+
;
20522029

2053-
| END_TRANS
2054-
{
2055-
TransactionStmt *n = makeNode(TransactionStmt);
2056-
n->command = END_TRANS;
2057-
$$ = (Node *)n;
2058-
}
2059-
| ROLLBACK
2060-
{
2061-
TransactionStmt *n = makeNode(TransactionStmt);
2062-
n->command = ABORT_TRANS;
2063-
$$ = (Node *)n;
2064-
}
2030+
opt_trans: WORK{ $$ = NULL; }
2031+
|TRANSACTION{ $$ = NULL: }
2032+
| /*EMPTY*/{ $$ = NULL; }
20652033
;
20662034

20672035

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp