Re: Default values in functions - Mailing list pgsql-general

From Michael Lewis
Subject Re: Default values in functions
Date
Msg-id CAHOFxGo0oC=vU8NXXGPMMWGxWxzu917EE-ZFD5OW0T6pE7CzHQ@mail.gmail.com
Whole thread Raw
In response to Re: Default values in functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Default values in functions
List pgsql-general


On Wed, Dec 29, 2021, 4:31 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
You didn't say what icount() is, but if it's the one from
contrib/intarray, it's STRICT meaning it'll return NULL,
not zero, for a null array input.

Thanks for that. Very good to know.

(Or IOW, null::int[] is not at all the same thing as array[]::int[].)

Understood. My hope is to pass a parameter that gets overridden by the default so that I can pass other parameters that come after.


>     SELECT pTimeToDisplay AT TIME ZONE'UTC' INTO pTimeToDisplay;

This is very unlikely to produce anything sane.

Sorry for that confusion. It was intended as an example of non default later in the list after a default.

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Default values in functions
Next
From: Tom Lane
Date:
Subject: Re: Default values in functions