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

From Tom Lane
Subject Re: Passing arrays to stored procedures
Date
Msg-id 3145.1177114869@sss.pgh.pa.us
Whole thread Raw
In response to 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:
> I'm using npgsql and C#, and I've realized it doesn't support passing
> arrays.  Barring things like updating npgsql, what form of hackiness
> would work best here?

> The customerIDs are GUIDs represented as 16-byte arrays.  I can pass
> them as encoded strings separated by commas or some such silliness.  But
> I don't see a nice clean split() function that returns me an array. :-(

Do you need one?  Can't you just pass the array as one parameter?
The text form of an array is like
    {value,value,value}
which shouldn't be that hard to deal with if you can generate the text
form of the individual bytea values.

            regards, tom lane

pgsql-general by date:

Previous
From: William Garrison
Date:
Subject: Passing arrays to stored procedures
Next
From: William Garrison
Date:
Subject: Re: Passing arrays to stored procedures