Re: Function with default value not replacing old definition of the function

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Rushabh Lathia" <rushabh(dot)lathia(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, rushabh(dot)lathia(at)enterprisedb(dot)com
Subject: Re: Function with default value not replacing old definition of the function
Date: 2008-12-11 19:24:58
Message-ID: 1A12792B-109A-4E3F-BF21-6F68599D73CB@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Le 11 déc. 08 à 16:22, Tom Lane a écrit :
> Yeah, we already bit this bullet with variadic functions --- if you
> have
> myfunc(int, float)
> myfunc(int, variadic float[])
> then it's ambiguous which one should be used for call "myfunc(11,
> 12.5)".
> The sanest answer I can see is "so, don't do that".

Is there any warning level message at CREATE FUNCTION time for the
user/dba to know he's doing something... border line, almost shooting
himself in the foot?

I'd really welcome such an error message as a reminder to consider
seriously such a choice, which would not be though out in lot of cases
I suppose.

Regards,
- --
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAklBaQoACgkQlBXRlnbh1bn0VgCeJB+cBxX1tg1Qgn+MYaW6hS8O
ZX8An3niWwN4lFIbwuBZJ8mKgTBThm6o
=d4lp
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Sitnikov 2008-12-11 19:31:25 Re: benchmarking the query planner
Previous Message Tom Lane 2008-12-11 19:06:32 Re: benchmarking the query planner