Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a41f73a

Browse files
committed
Add dump support for SortBy nodes. Needed this while debugging a reported
problem with DISTINCT, so might as well commit it.
1 parent ba38e36 commit a41f73a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/backend/nodes/outfuncs.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.327 2008/07/16 01:30:22 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.328 2008/07/17 16:02:12 tgl Exp $
1212
*
1313
* NOTES
1414
* Every node type that can appear in stored rules' parsetrees *must*
@@ -1985,6 +1985,17 @@ _outResTarget(StringInfo str, ResTarget *node)
19851985
WRITE_INT_FIELD(location);
19861986
}
19871987

1988+
static void
1989+
_outSortBy(StringInfo str, SortBy *node)
1990+
{
1991+
WRITE_NODE_TYPE("SORTBY");
1992+
1993+
WRITE_ENUM_FIELD(sortby_dir, SortByDir);
1994+
WRITE_ENUM_FIELD(sortby_nulls, SortByNulls);
1995+
WRITE_NODE_FIELD(useOp);
1996+
WRITE_NODE_FIELD(node);
1997+
}
1998+
19881999
static void
19892000
_outConstraint(StringInfo str, Constraint *node)
19902001
{
@@ -2426,6 +2437,9 @@ _outNode(StringInfo str, void *obj)
24262437
case T_ResTarget:
24272438
_outResTarget(str, obj);
24282439
break;
2440+
case T_SortBy:
2441+
_outSortBy(str, obj);
2442+
break;
24292443
case T_Constraint:
24302444
_outConstraint(str, obj);
24312445
break;

0 commit comments

Comments
 (0)