Michael Harris
2013-03-19 04:59:51 UTC
Hi,
We are thinking of using libpqxx in a project. One of the objectives of the project is to allow very high performance loading of data into a large database. Another characteristic is that some of the rows contain arbitrary binary data to be stored in BYTEA fields. We think we'd like to use COPY ... FROM STDIN for this, possibly with the binary format.
Looking at the API docs for libpqxx, there does seem to be some support for COPY through the tablewriter class, however that class is marked as deprecated, along with some scary warnings about multi-byte encodings. Also on the mailing list a couple of years back I can see a message (http://lists.pgfoundry.org/pipermail/libpqxx-general/2011-October/000575.html) calling for feedback on these table stream classes. Reading between the lines in this email I get the impression that the author's preference would be to drop support for COPY altogether. I did not find any follow up to this message though.
So my questions are:
1. Do the table stream classes work reliably in libpqxx 4.0?
2. Is there a plan to drop them? Or re-work the API into something else?
3. If they don't work or there is a plan to drop them, is there any way for us to implement support externally - for example does libpqxx expose lower level interfaces that we could use to enable support in our application?
BTW - the web site at pxqq.org seems to have been down the last few days (although ftp site is luckily still accessible).
Thanks in advance,
Regards // Mike
We are thinking of using libpqxx in a project. One of the objectives of the project is to allow very high performance loading of data into a large database. Another characteristic is that some of the rows contain arbitrary binary data to be stored in BYTEA fields. We think we'd like to use COPY ... FROM STDIN for this, possibly with the binary format.
Looking at the API docs for libpqxx, there does seem to be some support for COPY through the tablewriter class, however that class is marked as deprecated, along with some scary warnings about multi-byte encodings. Also on the mailing list a couple of years back I can see a message (http://lists.pgfoundry.org/pipermail/libpqxx-general/2011-October/000575.html) calling for feedback on these table stream classes. Reading between the lines in this email I get the impression that the author's preference would be to drop support for COPY altogether. I did not find any follow up to this message though.
So my questions are:
1. Do the table stream classes work reliably in libpqxx 4.0?
2. Is there a plan to drop them? Or re-work the API into something else?
3. If they don't work or there is a plan to drop them, is there any way for us to implement support externally - for example does libpqxx expose lower level interfaces that we could use to enable support in our application?
BTW - the web site at pxqq.org seems to have been down the last few days (although ftp site is luckily still accessible).
Thanks in advance,
Regards // Mike