Re: do functions cache views? - Mailing list pgsql-general

From Thomas F. O'Connell
Subject Re: do functions cache views?
Date
Msg-id 3AEDB311.7000203@monsterlabs.com
Whole thread Raw
In response to Re: do functions cache views?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> This is hard to believe.

i don't want to believe it. trust me.


> I am not sure that "if not found" means anything after a "select max()"
> query.  The select will always return exactly one row --- even if it's
> just a NULL --- so I'd expect the "if not found" never to succeed.
> Perhaps you want to be testing whether v_significant_date is NULL or
> not, instead.

i wasn't sure if this would work. i actually changed it to this after
trying just a straight null check. i'll change it back to that, and see
if i still experience the same problem. that may have been back when i
was still running 7.0.3 or an early 7.1 beta.

speaking of which, how is "found" functionality supposed to work?


> Another issue, since you omitted the details of the view and of what
> version you are running, is whether the view involves GROUP BY and/or
> aggregates.  An aggregate over a grouped view won't work properly in
> versions before 7.1.

this shouldn't be an issue since i'm running 7.1.


> If it's not those issues then we'll need more details --- preferably
> a self-contained example.

i'll try removing the "if not found" code and see what happens.

thanks.

-tfo


pgsql-general by date:

Previous
From: Michelle Murrain
Date:
Subject: Re: Locking a database
Next
From: "Fred Ingham"
Date:
Subject: RE: PostgreSQL and mySQL database size question