pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Lewis <mlewis@entrata.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Default values in functions
Date: Wed, 29 Dec 2021 19:31:55 -0500
Message-ID: <2185155.1640824315@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHOFxGpWRrBeEZJQP4-Z0Yahs3mFo3z=hQn-eJgStZPhnNVZug@mail.gmail.com>
References: <CAHOFxGpqLtuayEUxVZ5wmpdTp+y6m_VbVWw=zhCrNi1_TcEeQQ@mail.gmail.com>
	<CAKFQuwb4peZMzcsBnDj24Y0jRvPprfoebnP9+j9kuv9wL92xmg@mail.gmail.com>
	<CAHOFxGpWRrBeEZJQP4-Z0Yahs3mFo3z=hQn-eJgStZPhnNVZug@mail.gmail.com>

Michael Lewis <mlewis@entrata.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





view thread (8+ messages)  latest in thread

Message-ID: <2185155.1640824315@sss.pgh.pa.us>
Permalink:  ../2185155.1640824315@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2185155.1640824315@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mlewis@entrata.com, david.g.johnston@gmail.com
  Subject: Re: Default values in functions
  In-Reply-To: <2185155.1640824315@sss.pgh.pa.us>
  References: <CAHOFxGpqLtuayEUxVZ5wmpdTp+y6m_VbVWw=zhCrNi1_TcEeQQ@mail.gmail.com> <CAKFQuwb4peZMzcsBnDj24Y0jRvPprfoebnP9+j9kuv9wL92xmg@mail.gmail.com> <CAHOFxGpWRrBeEZJQP4-Z0Yahs3mFo3z=hQn-eJgStZPhnNVZug@mail.gmail.com> <2185155.1640824315@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox