save PGresult to file.

From: Alexey Lesovsky <lesovsky(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: save PGresult to file.
Date: 2017-02-21 18:54:10
Message-ID: CAGnetYdmwt+fE=x20bYmBy4GDdyvA_fneiLz7ApWsdXn_c6Mqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2017-02-21 20:14:36 Re: postgresql how to duplicate rows in result.
Previous Message Pavel Stehule 2017-02-21 18:34:49 Re: Feature request - psql --quote-variable