Re: shortcut for select * where id in (arrayvar)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: shortcut for select * where id in (arrayvar)
Date: 2008-03-31 01:40:52
Message-ID: 8157.1206927652@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> for _row in
> select err, msg from errortable where err in (errcode)

> where errcode is an array.
> That syntax doesn't work...

In recent PG releases it will work as "WHERE err = ANY (errcode)"
but note that there is *no* guarantee that the select will deliver
the rows in the same order the array elements are in.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amit Phatarphekar 2008-03-31 02:25:48 Logging/Viewing parameters of a prepared statement
Previous Message Dragan Zubac 2008-03-30 23:19:34 Re: database 1.2G, pg_dump 73M?!