Re: [SQL] WHERE parent IN (0,-1)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] WHERE parent IN (0,-1)
Дата
Msg-id 10969.933184043@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] WHERE parent IN (0,-1)  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-sql
>> It's a grammar problem.  in_expr_nodes and not_in_expr_nodes expect 
>> the elements of the IN-list to be AexprConst ... I wonder why not 
>> a_expr instead?  Might be a reduce conflict, but I bet we could at 
>> least use b_expr.  Thomas, any comments?

Indeed, there is no reduce conflict created by using a_expr, so I went
ahead and committed it.  Also tidied the list-generating code a bit.
Stuff like

select * from int4_tbl where f1 not in (0,123455+1);

seems to work fine now.

Drew, if you don't want to wait around for 6.6 to fix this, you
should be able to just change the occurrences of AexprConst to a_expr
in the productions for in_expr_nodes: and not_in_expr_nodes: in
src/backend/parser/gram.y.  I wouldn't advise trying to copy the current
gram.y into 6.5, since there are a bunch of other changes in it already...
        regards, tom lane


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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [SQL] WHERE parent IN (0,-1)
Следующее
От: Matthew Hagerty
Дата:
Сообщение: Join with blank records.