summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1996-12-17 01:53:43 +0000
committerBruce Momjian <bruce@momjian.us>1996-12-17 01:53:43 +0000
commitdb7a90f1d9cd8dfa148fb3524ec0c1e902511c9e (patch)
tree724e96c0a1ddcecd9d415a4fb9e659f97ebf81d1 /src/include/nodes
parentec105b60263fee1c71f42532bdb5f482d65cab66 (diff)
downloadpostgresql-db7a90f1d9cd8dfa148fb3524ec0c1e902511c9e.tar.gz
Make GROUP BY work with aliases, ORDER BY with column numbers
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/nodes.h4
-rw-r--r--src/include/nodes/parsenodes.h13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 992933c59f..c1203ac78b 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.3 1996/11/03 12:12:52 scrappy Exp $
+ * $Id: nodes.h,v 1.4 1996/12/17 01:53:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -190,7 +190,7 @@ typedef enum NodeTag {
T_ParamString,
T_TimeRange,
T_RelExpr,
- T_SortBy,
+ T_SortGroupBy,
T_RangeVar,
T_TypeName,
T_IndexElem,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 01c037b54f..9c6500135c 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.7 1996/11/13 20:56:15 scrappy Exp $
+ * $Id: parsenodes.h,v 1.8 1996/12/17 01:53:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -463,7 +463,7 @@ typedef struct CursorStmt {
List *fromClause; /* the from clause */
Node *whereClause; /* qualifications */
List *groupClause; /* group by clause */
- List *orderClause; /* sort clause (a list of SortBy's) */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
} CursorStmt;
/* ----------------------
@@ -480,7 +480,7 @@ typedef struct RetrieveStmt {
Node *whereClause; /* qualifications */
List *groupClause; /* group by clause */
Node *havingClause; /* having conditional-expression */
- List *orderClause; /* sort clause (a list of SortBy's) */
+ List *sortClause; /* sort clause (a list of SortGroupBy's) */
} RetrieveStmt;
@@ -627,14 +627,15 @@ typedef struct RelExpr {
} RelExpr;
/*
- * Sortby - for order by clause
+ * SortGroupBy - for order by clause
*/
-typedef struct SortBy {
+typedef struct SortGroupBy {
NodeTag type;
+ int resno; /* target number */
char *range;
char *name; /* name of column to sort on */
char *useOp; /* operator to use */
-} SortBy;
+} SortGroupBy;
/*
* RangeVar - range variable, used in from clauses