Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJ3lS-0005UK-2f for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Nov 2018 21:47:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJ3l9-0006he-Mw for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Nov 2018 21:47:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJ3l9-0006hX-Fz for pgsql-hackers@lists.postgresql.org; Sat, 03 Nov 2018 21:47:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJ3l7-0001Zw-3q for pgsql-hackers@postgresql.org; Sat, 03 Nov 2018 21:47:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA3Ll4oU028552; Sat, 3 Nov 2018 17:47:04 -0400 From: Tom Lane To: Pavel Stehule cc: Peter Eisentraut , PostgreSQL Hackers Subject: Re: bugfix: BUG #15477: Procedure call with named inout refcursor parameter - "invalid input syntax for type boolean" In-reply-to: <26116.1541278051@sss.pgh.pa.us> References: <1d846492-3822-616b-7246-91b429cc5dbb@2ndquadrant.com> <26116.1541278051@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 03 Nov 2018 16:47:31 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28550.1541281624.1@sss.pgh.pa.us> Date: Sat, 03 Nov 2018 17:47:04 -0400 Message-ID: <28551.1541281624@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > I'm going to go see about converting this to just call > expand_function_arguments and then drop all the special-case code. So while looking at that ... isn't the behavior for non-writable output parameters basically insane? It certainly fails to accord with the plpgsql documentation, which shows an example that would throw an error: CREATE PROCEDURE triple(INOUT x int) ... CALL triple(5); It's even weirder that you can get away with not supplying a writable target value for an output argument so long as it has a default. I think the behavior here ought to be "if the actual argument is a plpgsql variable, assign the output back to it, otherwise do nothing". That's much closer to the behavior of OUT arguments in other old-school programming languages. regards, tom lane