From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Greg Stark <stark(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Common Table Expressions applied; some issues remain |
Date: | 2009-05-27 11:20:01 |
Message-ID: | 4A1D21E1.1000309@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark wrote:
> On Wed, May 27, 2009 at 12:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm not too thrilled about that solution because it still eliminates
>> predictability of execution of volatile functions.
>
> How so? It means the volatile function might only be executed for the
> matching rows but the rows will still have the same value for the same
> rows for all references to the CTE which seems like the key property
> to me.
A volatile function could have side-effects, ie. insert rows to another
table. I would not recommend a design that relies on such behavior, but
it should be predictable how often the volatile function is run if you
do that.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-05-27 11:22:56 | Re: PostgreSQL Developer meeting minutes up |
Previous Message | Greg Stark | 2009-05-27 11:10:50 | Re: Common Table Expressions applied; some issues remain |