Hello,

François Hervieux wrote:
>     select name, cast (current_date || ' ' || value as timestamp) from ...
> 
> This cleans up the c++ code but isn't the performance loss just moved to 
> the postgresql server side ? I can be wrong but I'm guessing this is 
> going to concatenate each value as a string and then parse it as a 
> timestamp.

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.

Please see this additional backend-specific test:

http://soci.git.sourceforge.net/git/gitweb.cgi?p=soci;a=blobdiff;f=src/backends/postgresql/test/test-postgresql.cpp;h=4dcabc96bc5b6961395f207a5fa5c0fdabf9d69b;hp=fb1797a7d62b65cde81258064e2c47bb369c95f4;hb=4e8b962c185a07264cc7ba09af48f50aba31bb1b;hpb=afacd427b4ebc323a8b3cc77a722873aab991130

You will need to get the fresh sources from our Git repository and 
recompile the PostgreSQL backend to have this new functionality.

Regards,

-- 
Maciej Sobczak * www.msobczak.com * www.inspirel.com

------------------------------------------------------------------------------
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