From: | Andrew Chernow <ac(at)esilo(dot)com> |
---|---|
To: | Jeff Shanab <jshanab(at)smartwire(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Libpq enhancement |
Date: | 2011-06-19 16:39:38 |
Message-ID: | 4DFE264A.8090500@esilo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6/19/2011 11:04 AM, Jeff Shanab wrote:
> I am wondering If I am missing something obvious. If not, I have a suggestion
> for plpgsql.
>
> Stored procedures can accept rows.
>
> Libpq can receive rows (PQResult).
>
> Wouldn’t it be a great interface if PQResult was “bi-directional”? Create a
> result set on the client then call the database with a command.
>
> Perhaps…
>
> PQinsert(PQResult,”schema.table”); //iterate thru rows inserting
>
> PQupdate(PQResult,”schema.table”); //iterate thru rows updateing
>
> PQexec(connection,”scheme.function”,PQResult) //iterate thru rows passing row as
> arg to stored procedure.
>
Have you looked into libpqtypes? It allows you to pack nested structures/arrays
and pass them as query/function parameters.
http://pgfoundry.org/projects/libpqtypes/
http://libpqtypes.esilo.com/ (docs)
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2011-06-19 17:50:00 | Re: heap_hot_search_buffer refactoring |
Previous Message | Jesper Krogh | 2011-06-19 16:30:41 | Re: FOR KEY LOCK foreign keys |