Re: convertion from mySQL (mysql_fetch_row)

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: convertion from mySQL (mysql_fetch_row)
Дата
Msg-id b42b73150808221223h6c633f15o45ffd9a598844656@mail.gmail.com
обсуждение исходный текст
Ответ на convertion from mySQL (mysql_fetch_row)  ("Masis, Alexander \(US SSA\)" <alexander.masis@baesystems.com>)
Список pgsql-hackers
On Fri, Aug 22, 2008 at 2:20 PM, Masis, Alexander (US SSA)
<alexander.masis@baesystems.com> 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Masis, Alexander \(US SSA\)"
Дата:
Сообщение: convertion from mySQL (mysql_fetch_row)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CREATE CAST too strict?