[Libpqxx-general] pqxx::pipeline as a means of "posting" a call to a pl/pgSQL function
Peter Geoghegan
peter.geoghegan86 at gmail.com
Tue Jun 10 19:14:24 UTC 2008
Jeroen,
Very useful, thank you. I'm happy enough to use pipeline in this way,
but the case could be made that having a convenience method that is
similar to "result pqxx::transaction_base::exec( const
PGSTD::stringstream & Query, const PGSTD::string & Desc =
PGSTD::string())" that would be called, say, "post", that returns void
and never stalls(as its name suggests, "posting" a query), would be of
general utility. I'm not sure how easily implemented such a method
would be, as pqxx's innards are well encapsulated from me, but it's
something to consider.
Incidentally, my offer to create a demo application showcasing pqxx
with MFC ( Microsoft's wrapper classes for the win32 API) stands. Is
the demo database created by the demo/test programs SQL-ascii encoded?
I don't recall. I guess if it was, I'd use multibyte/ "Ansi" encoding
for the application - this is a variable byte-per-character (one or
two bytes) ascii superset that supports extended Latin characters, the
euro symbol etc. There are no invalid byte-sequences with this
encoding, so Postgres will never complain, no matter what you store
(you won't be storing Chinese or Arabic though). Perhaps a demo
application isn't appropriate at all (because it will so trivial), I'm
not sure - as I've said before though, mySQL++ has an MFC demo
application when I last looked about a year ago, so this is well
precedented.
Regards,
Peter Geoghegan
More information about the Libpqxx-general
mailing list