From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: More problems with 7.2 & functions |
Date: | 2002-02-16 19:58:05 |
Message-ID: | web-695920@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice pgsql-sql |
Tom,
> Could I trouble you for a full schema dump of these tables, so I
> don't
> have to waste time trying to reverse-engineer tables that will match
> the view?
Yeah, I was hoping that it would be an "Oh, yeah, THAT bug" from you.
Apparently it's not.
To avoid having to dump half my database, I've done some further
sleuthing on my own. Here's the source of the problem:
The last select of the union view includes a custom function in the
SELECT clause. This function works on its own. It works in the
SELECT clause when called from the command line. It also works if I
call it as the first select query of the UNION, but not as the last.
However, the bug is NOT reproduceable with a less complex model --
possibly not reproduceable on any other database. I have tried to
reproduce it using a simpler view that I could post to you, and I
can't. Since I can't give you the whole database at this time (IP
agreements), and I have a workaround, I will document the
circumstances:
1. Build a UNION view with four SELECTs unioned, each of which has 10
columns and references at least 4 tables.
2. The top 3 SELECTs should include a DATE column from one of the
tables.
3. The 4th SELECT should include:
a. a reference to another moderately complex view
b. a moderately complex (100 lines) custom plpgsql function resulting
in a TIMESTAMP value which supplies a column to align with the DATE
value in the top three SELECTs.
You may get the error I reported. Under any other circumstances, it
doesn't happen.
*sigh*. Only me ....
Thanks for you patience, Tom.
-Josh
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-16 20:02:12 | Re: More problems with 7.2 & functions |
Previous Message | Tom Lane | 2002-02-16 19:06:47 | Re: More problems with 7.2 & functions |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-16 20:02:12 | Re: More problems with 7.2 & functions |
Previous Message | Tom Lane | 2002-02-16 19:06:47 | Re: More problems with 7.2 & functions |