Hi, I use libdbi to access a database in some software I have made at work. The database is postgresql. In one of the tables I need to have higher time resolution than just whole seconds. The dbi_result_get_datetime() function fetches data as time_t:
http://libdbi.sourceforge.net/docs/programmers-guide/reference-field.html#DBI-RESULT-GET-DATETIME I have had to create a column nsec in my table to hold the fraction-of-a-second information. This is what I get when I do a query from psql: SELECT time,nsec FROM prop LIMIT 1 time | nsec ------------------------------------- 2015-09-22 20:46:11.843 | 842523000 Inserts were done via libdbi. So clearly libdbi has passed on more than whole second precition to postgresql. Postgresql stores microseconds in the timestamp type: http://www.postgresql.org/docs/9.1/static/datatype-datetime.html I would be very nice somehow to be able to pull this information out, and get rid of the extra nsec column. Is that possible? --Kjell CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel