Search Postgresql Archives

Re: Passing arrays to stored procedures

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

 



William Garrison <postgres@xxxxxxxxxxxx> writes:

>     WHERE customerid = ANY($1);
> Results in the error:
>     ERROR: op ANY/ALL (array) requires array on right side
>
> I tried casting the character string to an array afterward:
>
>     WHERE customerid = ANY($1::bytea);
> which results in:
>     ERROR: cannot cast type character varying to bytea

You meant array or bytea?


neo=# select '{1, 2, 3}'::int[];
  int4   
---------
 {1,2,3}
(1 record)

neo=# 


-- 
Jorge Godoy      <jgodoy@xxxxxxxxx>


[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