From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: creating variable views
Date: Sat, 07 Jul 2001 23:49:36 -0400
Message-ID: <5832.994564176@sss.pgh.pa.us> (raw)
In-Reply-To: <web-82299@davinci.ethosmedia.com>
References: <web-82299@davinci.ethosmedia.com>
"Josh Berkus" <josh@agliodbs.com> writes:
>> I don't understand the distinction you're trying to make here. In
>> general, a view column that is implemented as a function will give
>> the
>> optimizer headaches if you refer to it in WHERE --- the simplicity or
>> complexity of the function has got nothing to do with that AFAICS.
> OK. I thought that I noticed a difference between simple SQL functions
> and PL/pgSQL functions in this respect, but I could easily be mistaken.
AFAIR, the optimizer doesn't pay any attention at all to the
implementation language of a function. The only thing that comes to
mind here is that some care has been taken to mark all the built-in
functions as "iscachable" (or not, as appropriate); but user-created
functions may not be so marked when they should be, leading to loss of
performance in some cases.
regards, tom lane
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: tgl@sss.pgh.pa.us, josh@agliodbs.com
Subject: Re: creating variable views
In-Reply-To: <5832.994564176@sss.pgh.pa.us>
* 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