From 6b00d1a2e4c7675eca17e96bcbfcbf1c259bd850 Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Thu, 2 Jun 2011 16:32:30 +0200 Subject: Add date/time type image_traits --- odb/pgsql/traits.hxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'odb') diff --git a/odb/pgsql/traits.hxx b/odb/pgsql/traits.hxx index 847f13e..45c92e3 100644 --- a/odb/pgsql/traits.hxx +++ b/odb/pgsql/traits.hxx @@ -97,6 +97,19 @@ namespace odb template <> struct image_traits {typedef unsigned char* image_type;}; + // @@ Date/time binary support in PostgreSQL is sketchy and in some + // cases depends on server compile time constants. Using strings + // to avoid this. + // + template <> + struct image_traits {typedef details::buffer image_type;}; + + template <> + struct image_traits {typedef details::buffer image_type;}; + + template <> + struct image_traits {typedef details::buffer image_type;}; + // // value_traits // @@ -225,7 +238,7 @@ namespace odb struct default_type_traits; template - class type_traits: public default_type_traits + class type_traits: public default_type_traits { }; -- cgit v1.1