pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: More problems with 7.2 & functions
Date: Sat, 16 Feb 2002 11:58:05 -0800
Message-ID: <web-695920@davinci.ethosmedia.com> (raw)
In-Reply-To: <20728.1013886407@sss.pgh.pa.us>

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









view thread (6+ messages)  latest in thread

Message-ID: <web-695920@davinci.ethosmedia.com>
Permalink:  ../web-695920@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-695920@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us
  Subject: Re: More problems with 7.2 & functions
  In-Reply-To: <web-695920@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox