Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2jMP-0002fc-1I for pgsql-general@arkaria.postgresql.org; Thu, 30 Dec 2021 00:32:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2jMN-0008Qy-Sj for pgsql-general@arkaria.postgresql.org; Thu, 30 Dec 2021 00:31:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2jMN-0008Qo-I2 for pgsql-general@lists.postgresql.org; Thu, 30 Dec 2021 00:31:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2jML-0005bX-CK for pgsql-general@lists.postgresql.org; Thu, 30 Dec 2021 00:31:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BU0Vtrc2185156; Wed, 29 Dec 2021 19:31:55 -0500 From: Tom Lane To: Michael Lewis cc: "David G. Johnston" , PostgreSQL General Subject: Re: Default values in functions In-reply-to: References: Comments: In-reply-to Michael Lewis message dated "Wed, 29 Dec 2021 17:17:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2185154.1640824315.1@sss.pgh.pa.us> Date: Wed, 29 Dec 2021 19:31:55 -0500 Message-ID: <2185155.1640824315@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Lewis 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