Re: Is This A Set Based Solution? - Mailing list pgsql-general

From Tom Lane
Subject Re: Is This A Set Based Solution?
Date
Msg-id 7887.1173505028@sss.pgh.pa.us
Whole thread Raw
In response to Is This A Set Based Solution?  (Stefan Berglund <stefan_berglund@msn.com>)
List pgsql-general
Stefan Berglund <stefan_berglund@msn.com> writes:
> Below is a small test case that illustrates what I'm attempting which is
> to provide a comma separated list of numbers to a procedure which
> subsequently uses this list in a join with another table.

> My questions are is this a set based solution and is this the best
> approach in terms of using the data types and methods afforded by
> PostgreSQL?  I'm mostly inquiring about the double FOR loop which just
> doesn't feel right to me ...

It looks pretty ugly to me too, but you haven't explained your problem
clearly enough for anyone to be able to recommend a better solution path.
Why do you feel you need to do this?  What is the context?

            regards, tom lane

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Tsearch2 / Create rule on select
Next
From: Tom Lane
Date:
Subject: Re: query ... returned 4 columns