Search Postgresql Archives

why VARIADIC functions executed on array input?

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

 



CREATE FUNCTION foo (VARIADIC anyarray) RETURNS void AS $$
DECLARE
BEGIN
END
$$ LANGUAGE plpgsql;
SELECT foo (ARRAY[1]);

I would expect an error: Like:
ERROR: function f3oo(integer[]) does not exist

But I get this error:
ERROR: could not find array type for data type integer[]

Why VARIADIC functions are found on array input? In my opinion it
makes no sense and the disadvantage is that overloading with a
function like:  CREATE OR REPLACE FUNCTION foo (anyarray) doesn't
work.

Greetings Tjibbe

see example in: http://sqlfiddle.com/#!15/300e8/1



--
+31 6 29401726
tjibbe@xxxxxxxxxx
Jacobusstraat 185
3012 JM Rotterdam


-- 
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