On Fri, Aug 22, 2008 at 2:20 PM, Masis, Alexander (US SSA)
<[EMAIL PROTECTED]> wrote:
> People,
> I am converting  C++ code to Postgres.
> Need help on how to deal with mysql_fetch_row, mysql_store_result
> functions in Postgres? There should be some C/C++ code available for
> these things, I hope.
> Thanks,
> Alex.

http://www.postgresql.org/docs/8.3/interactive/libpq.html
in particular,
http://www.postgresql.org/docs/8.3/interactive/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO

The libpq API is slightly thicker than mysql, which essentially
returns char ** for MYSQL_ROW.

With pg, you have a lot of flexibility with how you send queries,
parameterized, asynchronous, prepared, etc.  For starters though you
want to look at PQexec which maps to (iirc) mysql_real_query, more or
less.

libpq has very nice handling of binary data -- the protocol has
ability to send and receive blobs (and other things) without escaping
-- which is nice.

merlin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to