Re: Question about STRICT

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Gevik Babakhani <pgdev(at)xs4all(dot)nl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question about STRICT
Date: 2009-06-03 09:36:28
Message-ID: 4136ffa0906030236n665739c2m6a7220da2984b745@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 3, 2009 at 9:45 AM, Gevik Babakhani <pgdev(at)xs4all(dot)nl> wrote:
> Could someone please clarify the difference between "RETURNS NULL ON NULL
> INPUT" or "STRICT" when creating a function.

They're synonyms.

> Do both options exist because
> of historical reasons/SQL standard compliance?

One or the other, not sure which.

> Shouldn't we raise an error when calling a function with NULL arguments
> values if the function is created as STRICT?

No, what they do is return NULL automatically. The function doesn't
have to check for NULL arguments itself.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2009-06-03 09:54:30 Re: 8.4b2 tsearch2 strange error
Previous Message Markus Wanner 2009-06-03 09:23:44 Re: Managing multiple branches in git