Re: [HACKERS] Re: subselects

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: vadim@sable.krasnoyarsk.su (Vadim B. Mikheev)
Cc: lockhart@alumni.caltech.edu, hackers@postgreSQL.org
Date: 1998-01-15T23:26:41Z
Lists: pgsql-hackers
> typedef struct SubLink {
> 	NodeTag		type;
> 	int		linkType; /* EXISTS, ALL, ANY, EXPR */
> 	bool		useor;    /* TRUE for <> */
> 	List	        *lefthand; /* List of Var/Const nodes on the left */
> 	List	        *oper;     /* List of Oper nodes */
> 	Query	        *subquery; /* */
> } SubLink;

OK, we add this structure above.  During parsing, *subquery actually
will hold Node *parsetree, not Query *.

And add to Query:

	bool	hasSubLinks;

Also need a function to return a List* of SubLink*.  I just did a
similar thing with Aggreg*.  And Var gets:

	int uplevels;

Is that it?


-- 
Bruce Momjian
maillist@candle.pha.pa.us