]> granicus.if.org Git - postgresql/commitdiff
Add structure for subselects.
authorThomas G. Lockhart <lockhart@fourpalms.org>
Mon, 1 Sep 1997 06:04:59 +0000 (06:04 +0000)
committerThomas G. Lockhart <lockhart@fourpalms.org>
Mon, 1 Sep 1997 06:04:59 +0000 (06:04 +0000)
Add field to support "WITH TIME ZONE".

src/include/nodes/nodes.h
src/include/nodes/parsenodes.h

index ecf8cff61c29dc9bf2751a2f3df7abda53b041cc..66c1b1812ce2fb74fc8a64ea39c6ac6c0bbb5f33 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: nodes.h,v 1.10 1997/08/31 11:43:08 vadim Exp $
+ * $Id: nodes.h,v 1.11 1997/09/01 06:04:57 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -206,7 +206,8 @@ typedef enum NodeTag {
     T_TargetEntry,
     T_RangeTblEntry,
     T_SortClause,
-    T_GroupClause
+    T_GroupClause,
+    T_SubSelect
 } NodeTag;
 
 /*
index 19f551559e4ceb4453f450cf1334388f8bb5f046..81e635cebad3bf73d567773e30202ff17a19fa70 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: parsenodes.h,v 1.21 1997/08/31 11:43:09 vadim Exp $
+ * $Id: parsenodes.h,v 1.22 1997/09/01 06:04:59 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -554,9 +554,9 @@ typedef struct CursorStmt {
     List               *targetList;    /* the target list (of ResTarget) */
     List               *fromClause;    /* the from clause */
     Node               *whereClause;   /* qualifications */
-    List              *groupClause;   /* group by clause */
+    List               *groupClause;   /* group by clause */
     List               *sortClause;    /* sort clause (a list of SortGroupBy's) */
-} CursorStmt;    
+} CursorStmt;
 
 /* ----------------------
  *     Select Statement
@@ -564,28 +564,42 @@ typedef struct CursorStmt {
  */
 typedef struct RetrieveStmt {
     NodeTag            type;
-    char                *unique;  /* NULL, '*', or unique attribute name */
-    char               *into;          /* name of table (for select into
-                                          table) */
+    char               *unique;        /* NULL, '*', or unique attribute name */
+    char               *into;          /* name of table (for select into table) */
     List               *targetList;    /* the target list (of ResTarget) */
     List               *fromClause;    /* the from clause */
     Node               *whereClause;   /* qualifications */
     List               *groupClause;   /* group by clause */
     Node               *havingClause;  /* having conditional-expression */
+    List               *selectClause;  /* subselect parameters */
     List               *sortClause;    /* sort clause (a list of SortGroupBy's) */
-} RetrieveStmt;    
+} RetrieveStmt;
 
 
 /****************************************************************************
  *  Supporting data structures for Parse Trees
  ****************************************************************************/
 
+/*
+ * SubSelect - specifies subselect parameters
+ */
+typedef struct SubSelect {
+    NodeTag            type;
+    char               *unique;        /* NULL, '*', or unique attribute name */
+    List               *targetList;    /* the target list (of ResTarget) */
+    List               *fromClause;    /* the from clause */
+    Node               *whereClause;   /* qualifications */
+    List               *groupClause;   /* group by clause */
+    Node               *havingClause;  /* having conditional-expression */
+} SubSelect;
+
 /*
  * TypeName - specifies a type in definitions
  */
 typedef struct TypeName {
     NodeTag            type;
     char               *name;          /* name of the type */
+    bool               timezone;       /* timezone specified? */
     bool               setof;          /* is a set? */
     List               *arrayBounds;   /* array bounds */
     int                        typlen;         /* length for char() and varchar() */