Re: Proposal for documenting 8.2 VALUES syntax

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal for documenting 8.2 VALUES syntax
Дата
Msg-id 6627.1158356978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal for documenting 8.2 VALUES syntax  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-docs
Alvaro Herrera <alvherre@commandprompt.com> writes:
> ... One likely useful example, if not already covered, is

> select ... FROM ... WHERE op ANY (VALUES ( ... ))

> I tripped over it a couple of days ago and it seems useful and non
> obvious.  ISTM it beats the current practice of

> op ANY(ARRAY[ ... ])

> which seems a bit of a kludge.

Unfortunately, we don't optimize the former nearly as well as the latter
:-(.  I was thinking of showing an example of a multi-column IN:

where (firstname,lastname) in (values ('joe','blow'), ('anne','smith'), ...

but I don't think we want to encourage people to use it in cases where
a scalar list or ANY(ARRAY) will serve.  Maybe next year ;-)

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Proposal for documenting 8.2 VALUES syntax
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] New XML section for documentation