Re: slow IN() clause for many cases

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: slow IN() clause for many cases
Date: 2005-11-29 22:39:12
Message-ID: 438CD890.90606@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
>
>>Do you think we'll be able to generate a single ScalarArrayOpExpr from a
>>small subselect and pass it through as an indexable expression?
>
> If you don't mind spelling it with the ARRAY(sub-select) syntax, which
> I think is a Postgres-ism (though it's possible Joe got it from
> SQL2003).

It's in SQL 2003. See excerpt below.

Joe

6.36 <array value constructor>

Function

Specify construction of an array.

Format

<array value constructor> ::=
<array value constructor by enumeration> |
<array value constructor by query>
<array value constructor by enumeration> ::=
ARRAY <left bracket or trigraph>
<array element list>
<right bracket or trigraph>
<array value constructor by query> ::=
ARRAY <left paren>
<query expression> [ <order by clause> ]
<right paren>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-11-29 22:53:38 Re: slow IN() clause for many cases
Previous Message Simon Riggs 2005-11-29 22:23:05 Re: ice-broker scan thread