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: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Default values in functions
Date: 2021-12-30 00:31:55
Message-ID: 2185155.1640824315@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:
> Thanks sir. It seems unfortunate that there is not a way to indicate
> absence of the third parameter if I need to set a value for the fourth
> parameter.

The way to do that is to use named parameters and the associated
call syntax, ie something like

select myfunc(param1 => 42, param3 => 99);

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2021-12-30 00:46:10 Re: Default values in functions
Previous Message Tom Lane 2021-12-30 00:28:07 Re: Default values in functions