aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-01-17 04:53:46 +0000
committerBruce Momjian <bruce@momjian.us>1998-01-17 04:53:46 +0000
commitb37bc65f44eb16e98212fc61b565bb86502812fd (patch)
tree0058866f3e0dcc08a98a534eee73cea7bd53bc3e /src/include
parentc65ea0e040f08b59407cd74f8f0f0dd190169d46 (diff)
downloadpostgresql-b37bc65f44eb16e98212fc61b565bb86502812fd.tar.gz
postgresql-b37bc65f44eb16e98212fc61b565bb86502812fd.zip
Creates the SubLink structure, and the Query->hasSubLink field,
with supporting code. Creates SubLink node in gram.y. psql.c patch for newatttypmod field.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/parsenodes.h3
-rw-r--r--src/include/nodes/primnodes.h29
-rw-r--r--src/include/parser/parse_node.h3
4 files changed, 34 insertions, 4 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 3f87ca202ac..9c913797dd4 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.22 1998/01/10 04:30:08 momjian Exp $
+ * $Id: nodes.h,v 1.23 1998/01/17 04:53:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,6 +60,7 @@ typedef enum NodeTag
T_Const,
T_Param,
T_Aggreg,
+ T_SubLink,
T_Func,
T_Array,
T_ArrayRef,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 02fa069df61..fc30cbf3e0a 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.45 1998/01/16 23:20:55 momjian Exp $
+ * $Id: parsenodes.h,v 1.46 1998/01/17 04:53:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,6 +45,7 @@ typedef struct Query
bool isBinary; /* binary portal? */
bool unionall; /* union without unique sort */
bool hasAggs; /* has aggregates in target list */
+ bool hasSubLinks; /* has subquery SubLink */
char *uniqueFlag; /* NULL, '*', or Unique attribute name */
List *sortClause; /* a list of SortClause's */
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 1e896e5e136..3da2c433cb7 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.12 1998/01/04 04:31:37 momjian Exp $
+ * $Id: primnodes.h,v 1.13 1998/01/17 04:53:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -271,6 +271,33 @@ typedef struct Aggreg
} Aggreg;
/* ----------------
+ * SubLink
+ * subLinkType - EXISTS, ALL, ANY, EXPR
+ * useor - TRUE for <>
+ * lefthand - list of Var/Const nodes on the left
+ * oper - list of Oper nodes
+ * subselect - subselect as Query* or parsetree
+ * ----------------
+ */
+typedef enum SubLinkType
+{
+ EXISTS_SUBLINK, ALL_SUBLINK, ANY_SUBLINK, EXPR_SUBLINK,
+ IN_SUBLINK, NOTIN_SUBLINK, OPER_SUBLINK
+} SubLinkType;
+
+
+typedef struct SubLink
+{
+struct Query;
+ NodeTag type;
+ SubLinkType subLinkType;
+ bool useor;
+ List *lefthand;
+ List *oper;
+ Node *subselect;
+} SubLink;
+
+/* ----------------
* Array
* arrayelemtype - base type of the array's elements (homogenous!)
* arrayelemlength - length of that type
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h
index be49fe7a0fa..a0915574a1d 100644
--- a/src/include/parser/parse_node.h
+++ b/src/include/parser/parse_node.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_node.h,v 1.4 1998/01/15 19:00:16 momjian Exp $
+ * $Id: parse_node.h,v 1.5 1998/01/17 04:53:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,6 +32,7 @@ typedef struct ParseState
List *p_rtable;
List *p_insert_columns;
bool p_hasAggs;
+ bool p_hasSubLinks;
bool p_is_insert;
bool p_is_update;
bool p_is_rule;