Re: Selecting pairs of numbers - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Selecting pairs of numbers
Date
Msg-id A737B7A37273E048B164557ADEF4A58B50FB371E@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: Selecting pairs of numbers  ("Charles Clavadetscher" <clavadetscher@swisspug.org>)
List pgsql-general
Charles Clavadetscher wrote:
>> aklaver@test=> create table pr_test(x int, y int);
>>
>> aklaver@test=> select * from pr_test  where (x, y) between (1, 3) and
>> (3,2) order by x,y;
>>   x | y
>> ---+---
>>   1 | 3
>>   1 | 4
>>   2 | 1
>>   2 | 2
>>   2 | 3
>>   2 | 4
>>   3 | 1
>>   3 | 2
> 
> +1, nice.

And the really cool thing about it is that it will work well
with a combined index on (x, y).

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BDR Rejoin of failed node, hangs.
Next
From: Steve Pritchard
Date:
Subject: Recording exceptions within function (autonomous transactions?)