Hrvoje Niksic <hniksic(a)iskon.hr> writes in xemacs-review(a)xemacs.org:
If you write lots of code like that, it's probably a good idea
to
create a "with-foo" macro:
(with-pq-connection (... connection params ...)
... code ...)
This is analogous to Common Lisp `with-open-file' and friends.
O.K. Good idea.
I want to write at least one manual example showing how to do it from
scratch. In the application I am currently writing, three very large
tables need to be loaded from text files, two from the same set of
data. While I'm loading two tables simultaneously, I am using two
COPY IN operations over two separate database connections.
...
It's conceivable that someone will simply _use_ your interface
to
implement a Postgres backend to Emacs-DBI. So your work is not
wasted, whatever the outcome.
Cool. It might also be that my backend inspires someone to do a DBI
interface in the first place. I asked for database code for years,
but never got anything beyond a pre-alpha doesn't-quite-work-yet
state, that never had library type support.
At any rate, programming it has restored an interest in XEmacs which I
had thought was completely dead.