Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 935F81337BA4 for ; Wed, 16 Feb 2011 11:24:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 09866-07; Wed, 16 Feb 2011 15:24:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 72CAC1337B68; Wed, 16 Feb 2011 11:24:06 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1GFNhoj024908; Wed, 16 Feb 2011 10:23:44 -0500 (EST) To: Florian Pflug cc: Oliver Jowett , Robert Haas , Lukas Eder , rsmogura , pgsql-jdbc@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function In-reply-to: References: <201101111946.33083.rsmogura@softperience.eu> <4d7cc4033a655539995c240a6f282ab5@mail.softperience.eu> <4D33CD00.6000408@opencloud.com> <4D5BBD1A.7010005@opencloud.com> <4D5BC65D.8070507@opencloud.com> Comments: In-reply-to Florian Pflug message dated "Wed, 16 Feb 2011 14:36:49 +0100" Date: Wed, 16 Feb 2011 10:23:43 -0500 Message-ID: <24907.1297869823@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/1522 X-Sequence-Number: 182311 Florian Pflug writes: > Hm, I've browsed through the code and it seems that the current behaviour > was implemented on purpose. Yes, it's 100% intentional. The idea is to allow function authors to use OUT-parameter notation (in particular, the convention of assigning to a named variable to set the result) without forcing them into the overhead of returning a record when all they want is to return a scalar. So a single OUT parameter is *supposed* to work just like a function that does "returns whatever" without any OUT parameters. Even if you think this was a bad choice, which I don't, it's far too late to change it. regards, tom lane