I can
select foo('{}'::int4[]) -- ok
select foo('{}') -- ok too
but
select foo(array[]) -- syntax error,
my function can by like
Correct -- you cannot use the ARRAY constructor empty. If you need an
empty array, use '{}'. Search the archives for previous discussions on
this t
On Mon, 1 Sep 2003, jconway wrote:
>
> You haven't shown us your function or how you're trying to call it. In
> any case, works here:
>
> regression=# CREATE FUNCTION foo(INTEGER[], INTEGER) RETURNS INTEGER AS
> 'select ss.f[1] from (select $1 || $2 as f) as ss' language sql;
> CREATE FUNCTION
>
Pavel Stehule <[EMAIL PROTECTED]> writes:
> Array and array's functions works fine, but I need call this function
> with empty array. I can't use array constructor for empty array.
Yeah. We have not figured out how to assign a type to "ARRAY[]".
You can do something like '{}'::integer[], however
Pavel Stehule wrote:
CREATE FUNCTION foo(date, date, INTEGER[]) RETURNS INTEGER
Array and array's functions works fine, but I need call this function
with empty array. I can't use array constructor for empty array. When
I call function foo with e.a. ,I get syntax error. I can call with '{}'.
Ar
On Mon, 1 Sep 2003, Bruce Momjian wrote:
> Pavel Stehule wrote:
> > Hello
> >
> > I have function
> >
> > CREATE FUNCTION foo(date, date, INTEGER[]) RETURNS INTEGER
> >
> > Array and array's functions works fine, but I need call this function
> > with empty array. I can't use array construc
Pavel Stehule wrote:
> Hello
>
> I have function
>
> CREATE FUNCTION foo(date, date, INTEGER[]) RETURNS INTEGER
>
> Array and array's functions works fine, but I need call this function
> with empty array. I can't use array constructor for empty array. When
> I call function foo with e.a. ,I
Hello
I have function
CREATE FUNCTION foo(date, date, INTEGER[]) RETURNS INTEGER
Array and array's functions works fine, but I need call this function
with empty array. I can't use array constructor for empty array. When
I call function foo with e.a. ,I get syntax error. I can call with '{}'