From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Rikard Pavelic <rikard(dot)pavelic(at)zg(dot)htnet(dot)hr>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: problems selecting from altered table |
Date: | 2007-06-19 16:35:57 |
Message-ID: | 467805ED.3020207@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Richard Huxton <dev(at)archonet(dot)com> writes:
>> Any developers care to comment?
>
> plpgsql isn't very bright about tuple descriptors containing dropped
> columns. The immediate problem is that compatible_tupdesc() doesn't
> think a tupdesc containing one column matches one containing the same
> column plus a dropped column; but fixing that would just allow
> subsequent processing to crash :-(. It needs a fair amount of work.
> I think the other PLs are no better.
OK, I think (after a bit of playing) I see what you mean.
If I do the following:
CREATE TYPE tt AS (id int);
CREATE OR REPLACE FUNCTION sel_test2() RETURNS tt AS $$
...
Then it all works OK, because the SELECT inside the function is
returning one int and so is the function.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-06-19 16:50:29 | Re: [PERFORM] Postgres VS Oracle |
Previous Message | Tom Lane | 2007-06-19 16:07:54 | Re: problems selecting from altered table |