File tree Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Original file line number Diff line number Diff line change 1111 *
1212 *
1313 * 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 $
1515 *
1616 * HISTORY
1717 * AUTHOR DATE MAJOR EVENT
@@ -3869,8 +3869,8 @@ opt_class: any_name { $$ = $1; }
38693869 ;
38703870
38713871opt_asc_desc: ASC { $$ = SORTBY_ASC; }
3872- | DESC { $$ = SORTBY_DESC; }
3873- | /* EMPTY*/ { $$ = SORTBY_DEFAULT; }
3872+ | DESC { $$ = SORTBY_DESC; }
3873+ | /* EMPTY*/ { $$ = SORTBY_DEFAULT; }
38743874 ;
38753875
38763876opt_nulls_order: NULLS_FIRST { $$ = SORTBY_NULLS_FIRST; }
@@ -5982,30 +5982,14 @@ sortby: a_expr USING qual_all_Op opt_nulls_order
59825982 $$ ->sortby_nulls = $4 ;
59835983 $$ ->useOp = $3 ;
59845984 }
5985- | a_expr ASC opt_nulls_order
5985+ | a_expr opt_asc_desc opt_nulls_order
59865986 {
59875987 $$ = makeNode(SortBy);
59885988 $$ ->node = $1 ;
5989- $$ ->sortby_dir = SORTBY_ASC ;
5989+ $$ ->sortby_dir = $2 ;
59905990 $$ ->sortby_nulls = $3 ;
59915991 $$ ->useOp = NIL;
59925992 }
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- }
60095993 ;
60105994
60115995
You can’t perform that action at this time.
0 commit comments