Search Postgresql Archives

Re: Calling overloaded function with NULL argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patryk Kordylewski <pk@xxxxxxxx> writes:
> i've found a strange behaviour when you have overloaded functions with 
> the same name and different argument types and try to call them with NULL.
> The stored procedures with "text" and "text[]" argument type gets called 
> - the variants with "integer" / "integer[]" produce the, i think 
> expected, behaviour and raise an exception "ERROR:  FUNCTION 
> foo(unknown) IS NOT UNIQUE".

Yeah, this is expected.  There's a weak preference to resolve NULL as
text if there's no other way to determine its type.  (It's handled the
same as an undecorated string literal.)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux