[database-devel] Request for Feedback on COPY IN/OUT support for postgresql-simple

Leon Smith leon.p.smith at gmail.com
Fri Jun 28 00:56:28 CEST 2013


Although the postgresql-libpq binding has supported both COPY IN and COPY
OUT for some time now, this functionality wasn't available to
postgresql-simple without mucking around in the Internal module to call
libpq functions on your own.

I just now fixed that.   The interface I went with ultimately mimics the
libpq interface rather closely,  albeit with many simplifications.   I did
consider offering fold-like combinators,  and while they would certainly be
much more convenient for some use cases,   they also introduce a number of
complications,  such as dealing with exceptions.

If anybody's interested in reviewing these latest patches,  I'd appreciate
it.    I suppose the one thing I'm most unsure about is exactly which
exceptions should
be raised under various conditions.

https://github.com/lpsmith/postgresql-simple/commit/491247f687fcbfd30c8b0f50bf7e4490a8140fba
https://github.com/lpsmith/postgresql-simple/commit/4cfcdbee22a0cb1fb7985988892264c9d3ed7350

Best,
Leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/database-devel/attachments/20130627/9f730685/attachment.htm>


More information about the database-devel mailing list