Re: [SQL] Using Array-Values in subselect

2000-11-14 Thread Alvar Freude
Tom Lane schrieb: > > The array stuff is pretty simplistic at the moment, and could be taken > a lot further if there were someone who wanted to work on it. > (hint hint) :) If i had time, this would be interesting, but I think my C experiences are not very good and some years old (I like much

Re: [SQL] Using Array-Values in subselect

2000-11-14 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > 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 ) The array stuff is pretty simplistic at the moment, and

Re: [SQL] Using Array-Values in subselect

2000-11-14 Thread Stephan Szabo
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 ) On Tue, 14 Nov 2000, Alvar Freude wrote: > Roberto Mello schrieb: > > Looks like you want someth

Re: [SQL] Using Array-Values in subselect

2000-11-14 Thread Alvar Freude
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 boo

RE: [SQL] Using Array-Values in subselect

2000-11-14 Thread Edmar Wiggers
IMHO you should use another table instead of an array. Forget about reasonable speed when using IN sub-queries, you'll get a sequential scan of the sub-query for every row in the master select. I've heard the EXISTS operator provides far better performance. In 7.1, there's a very nice solution:

Re: [SQL] Using Array-Values in subselect

2000-11-14 Thread Roberto Mello
Alvar Freude wrote: > > Hi, > > i want to create a linked structure of values. Each text has an id, an > array of children ids and the value itself. 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 t

[SQL] Using Array-Values in subselect

2000-11-14 Thread Alvar Freude
Hi, i want to create a linked structure of values. Each text has an id, an array of children ids and the value itself. CREATE TABLE structure ( id int8, children int8[], value text ); Now i want to select all values which are connected to a given parent #x at once. My firs