Re: Passing arrays to stored procedures

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: William Garrison <postgres(at)mobydisk(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Passing arrays to stored procedures
Date: 2007-04-21 00:21:09
Message-ID: 3145.1177114869@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

William Garrison <postgres(at)mobydisk(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William Garrison 2007-04-21 00:38:23 Re: Passing arrays to stored procedures
Previous Message William Garrison 2007-04-20 23:33:41 Passing arrays to stored procedures