[Libpqxx-general] Support char & unsigned char types

Maxime van Noppen maxime at altribe.org
Mon Oct 19 14:31:35 UTC 2009


Hi,

I have a CHAR field in my database and it seems that pqxx doesn't
support retrieving char fields (at least via the .as<char>() function).
I checked the source and it seems that there are no string_traits for
those two types. As it is quite straightforward I did the patch and it
works well for me (see attached file).

However, I'm curious about why all this string_traits stuff is needed.
Aren't C++ stringstreams sufficient for this ?

Thanks !

-- 
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_add_string_traits_char_unsigned_char.patch
Type: text/x-patch
Size: 1319 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/libpqxx-general/attachments/20091019/8e5357a2/attachment.bin>


More information about the Libpqxx-general mailing list