Re: Default values in functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Default values in functions
Date: 2021-12-30 00:28:07
Message-ID: 2184626.1640824087@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Lewis <mlewis(at)entrata(dot)com> writes:
> Understood. My hope is to pass a parameter that gets overridden by the
> default so that I can pass other parameters that come after.

As David explained, function parameters don't work that way.
You could mechanize something like substitute-a-default-for-
null-input, but you'll have to do it with explicit logic.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-12-30 00:31:55 Re: Default values in functions
Previous Message Michael Lewis 2021-12-30 00:22:49 Re: Default values in functions