[GENERAL] save PGresult to file. - Mailing list pgsql-general

From Alexey Lesovsky
Subject [GENERAL] save PGresult to file.
Date
Msg-id CAGnetYdmwt+fE=x20bYmBy4GDdyvA_fneiLz7ApWsdXn_c6Mqw@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi,

I'm trying to write a simple С program which sends a query to postgres and saves answer to a binary file. Next, I want to read the content from the binary file into an empty PGresult struct.

And I've faced with two problems, I don't know how to calculate size of returned PGresult struct and how to write struct' content entirely to file without PQgetvalue loops.

Is it possible and how to do it correctly?

--
Regards, Alexey


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [GENERAL] Feature request - psql --quote-variable
Next
From: Merlin Moncure
Date:
Subject: Re: [GENERAL] postgresql how to duplicate rows in result.