Re: Polymorphic arguments and composite types

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Polymorphic arguments and composite types
Дата
Msg-id 1191601030.18360.2.camel@dogma.ljc.laika.com
обсуждение исходный текст
Ответ на Re: Polymorphic arguments and composite types  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Polymorphic arguments and composite types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Polymorphic arguments and composite types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Polymorphic arguments and composite types