From: | Chris Corbyn <chris(at)w3style(dot)co(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Is PQexecParams() simply a wrapper function? |
Date: | 2012-09-22 23:57:48 |
Message-ID: | 4263041C-6A1F-4085-A713-489F0A54851A@w3style.co.uk |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi All,
I'm currently using PQexecParams() as part of a bridge to allow Postgres to be used in another programming language. Not specifying the OIDs simplifies things (for the end user), but bytea params still cause headaches, since they need to be formatted differently and I receive the data as a (char *) internally, but can't really infer a type myself, at least not reliably.
It looks like PQprepare(), PQdescribePrepared() and PQexecPrepared() could be used to allow me to check if any of the params represent a BYTEAOID, then escape only those params. This seems like 3 round-trips to the server, however. That said, I believe PQexecParams() is doing a similar thing, in that it internally prepares a statement, then executes it (2 round trips). Or am I needlessly concerning myself over microseconds here?
Cheers,
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2012-09-23 01:21:34 | Re: pg_reorg in core? |
Previous Message | Peter Eisentraut | 2012-09-22 23:45:24 | Re: pg_reorg in core? |