Re: [HACKERS] subquery syntax broken
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] subquery syntax broken |
Дата | |
Msg-id | 199802021700.MAA12855@candle.pha.pa.us обсуждение исходный текст |
Ответ на | subquery syntax broken ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>) |
Список | pgsql-hackers |
> vac=> select * from x where y = (select max(y) from x); > ERROR: parser: parse error at or near "select" > vac=> select * from x where y <> (select max(y) from x); > ERROR: parser: parse error at or near "select" Sorry I missed that most obvious option. Here is the patch. I will apply it today. --------------------------------------------------------------------------- *** ./backend/parser/gram.y.orig Mon Feb 2 11:51:05 1998 --- ./backend/parser/gram.y Mon Feb 2 11:59:12 1998 *************** *** 3330,3335 **** --- 3330,3345 ---- n->subselect = $5; $$ = (Node *)n; } + | a_expr Op '(' SubSelect ')' + { + SubLink *n = makeNode(SubLink); + n->lefthand = lcons($1, NULL); + n->oper = lcons($2,NIL); + n->useor = false; + n->subLinkType = ALL_SUBLINK; + n->subselect = $4; + $$ = (Node *)n; + } | a_expr AND a_expr { $$ = makeA_Expr(AND, NULL, $1, $3); } | a_expr OR a_expr -- Bruce Momjian maillist@candle.pha.pa.us
В списке pgsql-hackers по дате отправления: