Re: WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows
Date
Msg-id b42b73150810080626v2256facay9d865ee680bcdd1@mail.gmail.com
Whole thread Raw
In response to WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows
List pgsql-hackers
On Tue, Oct 7, 2008 at 9:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> * Instead of the above, we could try to make
>        ROW(some columns) = ANY (array variable)
> work.  This is shorter than the above syntax and would presumably have
> a lot less overhead too.  But it doesn't work right now, not even for
> named rowtypes much less anonymous ones.

By extension, would this also mean things like
select row(1,2,3)::foo = foo from foo;
or
select (1,2,3)::foo = (1,2,3)::foo;
or
select (1,2,3) = (1,2,3)::foo;

Would work (presumably as row-wise comparison does)? Also,
create index foo_idx on foo(foo);
select * from foo where (1,2,3)::foo = foo;

would be very nice.

> I'm thinking that addressing these pieces would be a generally good
> thing to do, above and beyond potential uses in recursive queries.

absolutely.

merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Transactions and temp tables
Next
From: Simon Riggs
Date:
Subject: Re: [PATCHES] Infrastructure changes for recovery (v8)