File tree 1 file changed +5
-21
lines changed 1 file changed +5
-21
lines changed Original file line number Diff line number Diff line change 11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.581 2007/03/13 00:33:41 tgl Exp $
14
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.582 2007/03/17 19:27:12 meskes Exp $
15
15
*
16
16
* HISTORY
17
17
* AUTHOR DATE MAJOR EVENT
@@ -3869,8 +3869,8 @@ opt_class: any_name { $$ = $1; }
3869
3869
;
3870
3870
3871
3871
opt_asc_desc: ASC { $$ = SORTBY_ASC; }
3872
- | DESC { $$ = SORTBY_DESC; }
3873
- | /* EMPTY*/ { $$ = SORTBY_DEFAULT; }
3872
+ | DESC { $$ = SORTBY_DESC; }
3873
+ | /* EMPTY*/ { $$ = SORTBY_DEFAULT; }
3874
3874
;
3875
3875
3876
3876
opt_nulls_order: NULLS_FIRST { $$ = SORTBY_NULLS_FIRST; }
@@ -5982,30 +5982,14 @@ sortby: a_expr USING qual_all_Op opt_nulls_order
5982
5982
$$ ->sortby_nulls = $4 ;
5983
5983
$$ ->useOp = $3 ;
5984
5984
}
5985
- | a_expr ASC opt_nulls_order
5985
+ | a_expr opt_asc_desc opt_nulls_order
5986
5986
{
5987
5987
$$ = makeNode(SortBy);
5988
5988
$$ ->node = $1 ;
5989
- $$ ->sortby_dir = SORTBY_ASC ;
5989
+ $$ ->sortby_dir = $2 ;
5990
5990
$$ ->sortby_nulls = $3 ;
5991
5991
$$ ->useOp = NIL;
5992
5992
}
5993
- | a_expr DESC opt_nulls_order
5994
- {
5995
- $$ = makeNode(SortBy);
5996
- $$ ->node = $1 ;
5997
- $$ ->sortby_dir = SORTBY_DESC;
5998
- $$ ->sortby_nulls = $3 ;
5999
- $$ ->useOp = NIL;
6000
- }
6001
- | a_expr opt_nulls_order
6002
- {
6003
- $$ = makeNode(SortBy);
6004
- $$ ->node = $1 ;
6005
- $$ ->sortby_dir = SORTBY_DEFAULT;
6006
- $$ ->sortby_nulls = $2 ;
6007
- $$ ->useOp = NIL;
6008
- }
6009
5993
;
6010
5994
6011
5995
You can’t perform that action at this time.
0 commit comments