From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stefan Berglund <sorry(dot)no(dot)koolaid(at)for(dot)me> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is This A Set Based Solution? |
Date: | 2007-03-12 14:41:21 |
Message-ID: | 15437.1173710481@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stefan Berglund <sorry(dot)no(dot)koolaid(at)for(dot)me> writes:
> On Sat, 10 Mar 2007 00:37:08 -0500, tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
>> 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?
> What I want to do is to create a function that takes a comma separated
> string of numbers and produces a table (where each row is one of those
> numbers) that can be joined to other tables as in the example first
> provided.
That was what you said before. The question is why you need to do that.
It strikes me that having such a requirement is a symptom of poor data
representation choices. Perhaps an array would be better, or maybe you
ought to refactor your table layout altogether. But, as I said, you
haven't provided any info that would let someone give advice at that
level.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Paolo Negri | 2007-03-12 15:02:52 | ALTER column TYPE varying question |
Previous Message | Magnus Hagander | 2007-03-12 14:37:57 | Re: [GENERAL] PostgreSQL crashes on Windows 2003 |