Am Montag, den 25.04.2011, 19:50 -0400 schrieb Toby Thain:
> On 25/04/11 5:47 PM, Holger Hetterich wrote:
> > Hi,
> > 
> > In postgresql I store data of type "timestamp" such as:
> > "2011-04-17 12:58:51.074"
> > 
> > While the database can handle this format, and for example correctly
> > sorts while taking care of the milliseconds, it looks to me it's
> > impossible to retrieve this data via libDBI. What I found was the
> > get_datetime functions, which return a time_t. Any way to get the
> > information about the milliseconds, _or_ get a string or binary
> > representation of what is stored in the DB, so that I can convert it
> > back to a string on the client side?
> > 
> 
> Indeed, a function to retrieve this as a string is needed. It's really
> an error for the library to treat it like a time_t; I think the MySQL
> DATE/TIME types come back as strings (but don't quote me; it's a long
> time since I used libdbi).

libDBI is so cool, I think it's worth to extend libDBI with functions to
return DB data as a string representation in general.

I have time pressure on my current project, and getting the milliseconds
is not crucial, so I can forward now with a time_t. After that, I would
like to look deeper at libDBI and create patches to return any value as
a string representation. Would that be a good idea?

Holger



> 
> --Toby
> 
> 
> > Or maybe I oversee a useful function to get to this information...
> > 
> > Holger
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------------
> > WhatsUp Gold - Download Free Network Management Software
> > The most intuitive, comprehensive, and cost-effective network 
> > management toolset available today.  Delivers lowest initial 
> > acquisition cost and overall TCO of any competing solution.
> > http://p.sf.net/sfu/whatsupgold-sd
> > _______________________________________________
> > libdbi-devel mailing list
> > libdbi-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/libdbi-devel
> > 
> 
> 
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> libdbi-devel mailing list
> libdbi-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libdbi-devel



------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
libdbi-devel mailing list
libdbi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to