Re: Using Array-Values in subselect

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Alvar Freude <alvar(dot)freude(at)merz-akademie(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using Array-Values in subselect
Date: 2000-11-14 22:31:10
Message-ID: Pine.BSF.4.21.0011141429020.68986-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


If you look in contrib of the source, there is a set of
array operators(functions) including element in set.
That'll probably do what you want (you don't do an in
actually, it'll be like <elem> <op> <array column>)

On Tue, 14 Nov 2000, Alvar Freude wrote:

> Roberto Mello schrieb:
> > Looks like you want something similar to Oracle's CONNECT BY statement.
> > There are some solutions to that. At OpenACS we had to deal with that so
> > implemented something like what you described here.
> > However, the methods described by Joe Celko is his book "SQL For
> > Smarties" on chapters 28 and 29 (I think) are better and more robust. If
> > you search for "trees" and related topics at the openacs.org and
> > arsdigita.com's web/db web bulletin boards, you'll find several hits.
>
> Thanks, the solutions discussed on these sites suggest the use of lookup
> tables with parent and child for each record. I have thought about the
> same, but thought the arrays in Postgres could provide a more elegant
> way of building a tree.
>
> I want to migrate from MySQL to Postgres mainly because the array and
> subselect features. And finally the article at
> http://www.phpbuilder.com/columns/tim20001112.php3 convinced me it could
> run on my small machine. But it appears to me that the arrays always are
> handled like strings and are not really useful for anything advanced. I
> can't really believe it, please prove me wrong! I have set great hope in
> Postgres. :)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-11-14 23:16:49 Re: Using Array-Values in subselect
Previous Message Alvar Freude 2000-11-14 21:48:12 Re: Using Array-Values in subselect