Search Postgresql Archives

Re: variadic array arguments, can it work?

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

 



Ingmar Brouns <swingi@xxxxxxxxx> writes:
> I was trying to write a variadic function where the arguments themselves
> are arrays, but calling it does not seem to work. I couldn't find
> documentation mentioning this restriction

> postgres=# create or replace function foo(variadic args integer[][])

The reason that doesn't work the way you're expecting is that
1-dimensional integer arrays are not a distinct datatype from
2-dimensional integer arrays.  The system just sees "variadic int[]"
and expects simple integers in a variadic expansion.  Sorry.

			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