Re: [HACKERS] INTERSECT in gram.y again

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] INTERSECT in gram.y again
Дата
Msg-id 199901221934.OAA17586@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] INTERSECT in gram.y again  (Michael Meskes <Michael.Meskes@usa.net>)
Ответы Re: [HACKERS] INTERSECT in gram.y again  (Michael Meskes <Michael.Meskes@usa.net>)
Список pgsql-hackers
> On Thu, Jan 21, 1999 at 03:08:20PM -0500, Bruce Momjian wrote:
> > > I still wonder if the for-update-tests in SelectStmt: are okay. Shouldn't
> > > the test check for intersect_present=TRUE instead of intersectClause !=
> > > NULL?
> > 
> > Looks like they are the same.  Both are true or false.
> 
> But I think intersectClause is set to op regardless if there is an intersect
> clause at all. Or did I miss something?

As far as I can tell, The 'else' part of the query only gets executed in
the case of UNION, EXCEPT, or INTERCEPT.  Because FOR UPDATE is invalid
in all these cases, the intersectClause being non-NULL is an OK test,
though, as you point out, it is not accurate.  I have modified gram.y to
check just for unionClause:

if (n->unionClause != NULL)elog(ERROR, "SELECT FOR UPDATE is not allowed with UNION/INTERSECT/EXCEPT claus$

and removed the intersectClause test.  Thanks for pointing this out.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: [HACKERS] more patches for ecpg
Следующее
От: John Ryan
Дата:
Сообщение: Re: [HACKERS] Postgres Speed or lack thereof