| From: | Chris Angelico <rosuav(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Coalesce bug ? |
| Date: | 2012-12-21 22:39:04 |
| Message-ID: | CAPTjJmrmFX0_Z7mcLQP9LNurchvPkFwntNRvX4QMfXqVd0M-og@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sat, Dec 22, 2012 at 9:31 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On 12/21/2012 02:22 PM, Chris Angelico wrote:
>> As I understand it, there are three keywords: VOLATILE, STRICT, and
>> IMMUTABLE. Putting one of those keywords into the declaration flags
>> the function accordingly; if none is given, VOLATILE is assumed.
>>
>> Declaring the function as "STRICT IMMUTABLE" or "STRICT VOLATILE"
>> seems at best redundant (the word "STRICT" is mere noise), and at
>> worst confusing (the parser might be interpreting it as "STRICT", not
>> as the other keyword). Or is there something I'm missing here?
>
>
> Not sure I am following.
>
> IMMUTABLE/VOLATILE/STABLE deal with the query optimizer.
>
> CALLED ON NULL INPUT/STRICT deal with NULL input behavior.
>
> http://www.postgresql.org/docs/9.2/interactive/sql-createfunction.html
OOPS! Error's mine, sorry everyone! I thought the keyword was STRICT,
but it's actually STABLE that does that. Apologies to anyone who's
been confused by my miswording in this thread!
STRICT VOLATILE makes perfect sense; STABLE VOLATILE is what doesn't.
ChrisA
| From | Date | Subject | |
|---|---|---|---|
| Next Message | 裴旭斌 | 2012-12-22 01:16:52 | |
| Previous Message | Tom Lane | 2012-12-21 22:37:00 | Re: UNION and pg_restore |