Re: Passing arrays to stored procedures - Mailing list pgsql-general

From Jorge Godoy
Subject Re: Passing arrays to stored procedures
Date
Msg-id 87odlio8q7.fsf@gmail.com
Whole thread Raw
In response to Re: Passing arrays to stored procedures  (William Garrison <postgres@mobydisk.com>)
Responses Re: Passing arrays to stored procedures  (William Garrison <postgres@mobydisk.com>)
List pgsql-general
William Garrison <postgres@mobydisk.com> 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@gmail.com>

pgsql-general by date:

Previous
From: William Garrison
Date:
Subject: Re: Passing arrays to stored procedures
Next
From: RPK
Date:
Subject: Re: Schema relationship diagram