Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-08 Thread Sebastien FLAESCH
I could manage to identify/describe interval fields by testing the different values returned by PQfmod(). Could someone confirm that PQfmod() returns will not change in future versions? I have seen in the docs that there is a deprecated compile-time option that defines how time, timestamp and

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-07 Thread Sebastien FLAESCH
Albe Laurenz wrote: Sebastien FLAESCH wrote: According to the doc, INTERVAL output format is controlled by SET intervalstyle. I am writing an interface/driver and need a solution to fetch/convert interval values independently from the current format settings... I could force my driver to im

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-07 Thread Albe Laurenz
Sebastien FLAESCH wrote: > According to the doc, INTERVAL output format is controlled by > SET intervalstyle. > > I am writing an interface/driver and need a solution to > fetch/convert interval > values independently from the current format settings... > > I could force my driver to implicitly

Re: [GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-06 Thread Sebastien FLAESCH
Further, little libpq question: When using INTERVAL types, can I rely on PQfmod(), PQfsize() to determine the exact definition of the INTERVAL precision? => what YEAR/MONTH/DAY/HOUR/MINUTE/SECOND fields where used to create the column. I get different values for the type modifier, but how to i