Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YJrYf-0006eO-RT for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Feb 2015 22:39:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YJrYf-0001Xy-AJ for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Feb 2015 22:39:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YJrYe-0001Xq-LW for pgsql-bugs@postgresql.org; Fri, 06 Feb 2015 22:39:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YJrYb-0001Hi-Em for pgsql-bugs@postgresql.org; Fri, 06 Feb 2015 22:39:26 +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 t16MdNV5005362; Fri, 6 Feb 2015 17:39:23 -0500 From: Tom Lane To: David G Johnston cc: pgsql-bugs@postgresql.org Subject: Re: Function parameter type precision modifiers ignored. In-reply-to: <1423260348880-5837000.post@n5.nabble.com> References: <54D39E4A.9030600@opalsoftware.co.uk> <4295.1423259824@sss.pgh.pa.us> <1423260348880-5837000.post@n5.nabble.com> Comments: In-reply-to David G Johnston message dated "Fri, 06 Feb 2015 15:05:48 -0700" Date: Fri, 06 Feb 2015 17:39:23 -0500 Message-ID: <5361.1423262363@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David G Johnston writes: > Tom Lane-2 wrote >> Attributes applied to function parameter types --- or result types for >> that matter --- are entirely ignored by Postgres; only the base type >> matters. This is documented. > Maybe it would be more obvious in the section detailing "argtype"...but its > not like its buried deep in the documentation. The bigger problem is > understanding exactly what that notes means in reality. Often that means > getting bit by the behavior first and then reading about what just bit you. > Happens to all of us. > I'm for the idea of issuing a syntax error upon seeing "type()" in general > but not strongly since perfectly valid code (often back-stopped by table > constraints) currently works and would otherwise have no reason to change > other than to conform to this decision. Another possibility is to issue a WARNING or NOTICE rather than hard error. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs