Re: Subselect left join / not exists()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Desmond Coertzen <patrolliekaptein(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Subselect left join / not exists()
Date: 2016-03-14 13:42:41
Message-ID: 30076.1457962961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Desmond Coertzen <patrolliekaptein(at)gmail(dot)com> writes:
> I was under the impression that postgres will not allow me to declare a
> function immutable if it falls outside of the bounds of the definition.

IIRC, there was an explicit decision not to throw errors for "immutable
function reads a table", because we have no way to be sure that such a
thing might not be safe in practice in a particular usage. (That is,
you actually don't ever change the table's contents after first use of
the function.) But yeah, it's a gray area.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message ivo liondov 2016-03-16 00:10:35 delete taking long time
Previous Message Desmond Coertzen 2016-03-14 09:40:56 Re: Subselect left join / not exists()