>
> I have just updated the PostgreSQL backend so that it understands all
> possible variants:
> - only the date (the time is assumed to be 00:00:00)
> - only the time of day (the date is assumed to be 1900-01-01, as this is
> the lowest value in relevant fields of std::tm)
> - both date and time of day.
>

This is great thank you very much! I noticed a small problem though :
Postgresql allows the time values to contain fractional seconds (like
12:45:05.6585 for example) and SOCI throws a soci::soci_error upon such
values (what():  Cannot convert data to std::tm). I know a std::tm structure
cannot store such values but would it be possible to just truncate it and
discard the fractional part ?

I had another problem when I tried to insert data into this "time" column
and I think it's related to this one. I want to insert data from a std::tm
in which the date part is set to 0 (year, month, day) and I get an error
(what():  ERROR:  date/time field value out of range: "1900-01-00
12:45:00"). I may be wrong about that as this is an error from Postgresql
and not SOCI but I find it weird to get this kind of error while inserting a
time value.

Regards.

-- 
François Hervieux
[email protected]
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to