Re: Polymorphic arguments and composite types - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Polymorphic arguments and composite types
Date
Msg-id 1191601030.18360.2.camel@dogma.ljc.laika.com
Whole thread Raw
In response to Re: Polymorphic arguments and composite types  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Polymorphic arguments and composite types
List pgsql-hackers
On Fri, 2007-10-05 at 16:04 +0100, Simon Riggs wrote:
> > select * from c, c as c2 where c.col1 = any (c2.col2)
> 
> That works, thanks. 
> 
> As I said, I already solved the problem a different way. I was looking
> to understand the 3 questions I raised along the way.
> 
> Can you throw any light on those questions?
> 1. Why doesn't the subselect work?
> 

You could do something like:

SELECT * FROM c AS c1, c AS c2 WHERE ARRAY[c1.col1] <@ ANY(SELECT c2.col2);

Regards,Jeff Davis 



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Polymorphic arguments and composite types
Next
From: Tom Lane
Date:
Subject: Re: Polymorphic arguments and composite types