Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Proposal for documenting 8.2 VALUES syntax



Alvaro Herrera <alvherre(at)commandprompt(dot)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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group