[GENERAL] INTERVAL documentation bug?

2009-07-08 Thread Sebastien FLAESCH
I believe the documentation (Data Types section) is missing one INTERVAL "field": HOUR TO SECOND http://www.postgresql.org/docs/8.4/static/datatype-datetime.html The interval type has an additional option, which is to restrict the set of stored fields by writing one of these phrases:

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

2009-07-08 Thread Sebastien FLAESCH
intervals are stored (using double or int64), I guess this should not affect the value returned by PQfmod()... right? Thanks! Seb Sebastien FLAESCH wrote: Further, little libpq question: When using INTERVAL types, can I rely on PQfmod(), PQfsize() to determine the exact definition of the

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

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

2009-07-06 Thread Sebastien FLAESCH
to interpret this? Can someone point me to the documentation or source code where I can find more details about this? I found this: http://www.postgresql.org/docs/8.4/static/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO But there are not much details in PQfmod() description... Thanks! Seb Sebast

[GENERAL] Normalize INTERVAL ouput format in a db driver

2009-07-06 Thread Sebastien FLAESCH
Hi all, Just testing 8.4rc2 INTERVALs... 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 implicitl

Re: [GENERAL] INTERVAL SECOND limited to 59 seconds?

2009-06-08 Thread Sebastien FLAESCH
This is of course unexpected to me (one day becomes an hour)... Actually I would even expect an error, because there are missing interval parts. To represent a valid day to second interval, you should write '1 00:00:00' ... '1' would be a valid day to day interval. Always providing all interva

Re: [GENERAL] Need for official 0.83 release

2009-06-03 Thread Sebastien FLAESCH
Oups sorry wrong mailing list. Wanted to ask about next FreeTDS release. I apologies, Seb PS: It's just to take data from an SQL Server and store it with PostgreSQL, I promise ;-) Sebastien FLAESCH wrote: Hi all, Is there any plan to make 0.83 stable release? Maybe some roadmap / pla

[GENERAL] Need for official 0.83 release

2009-06-03 Thread Sebastien FLAESCH
Hi all, Is there any plan to make 0.83 stable release? Maybe some roadmap / plans on the website would help, just to give an idea of the future versions (availability, features). Thanks! Seb -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] INTERVAL SECOND limited to 59 seconds?

2009-06-01 Thread Sebastien FLAESCH
operators and functions) are not 100% SQL99, but they are close... Thanks a lot! Seb Tom Lane wrote: Sebastien FLAESCH writes: I would expect that an INTERVAL SECOND can store more that 59 seconds. I took a look into the SQL spec and I think that we do indeed have a spec compliance issue here

Re: [GENERAL] INTERVAL data type and libpq - what format?

2009-05-25 Thread Sebastien FLAESCH
Tom Lane wrote: Ron Mayer writes: Sam Mason wrote: You get an error because " 123 11" isn't a valid literal of an (undecorated) INTERVAL type. Hmm. should it be? Well, we do allow it if it's *explicitly* stated to be a day to hour interval: regression=# select interval '123 11' day t

Re: [GENERAL] INTERVAL data type and libpq - what format?

2009-05-19 Thread Sebastien FLAESCH
Tom Lane wrote: Sam Mason writes: I don't really know 8.4, but I believe you're saying here that you explicitly want the values to be of basic INTERVAL type here, i.e. not INTERVAL DAY TO HOUR for parameter 3. Right, you can get the equivalent behavior from psql thus: regression=# select '-1

Re: [GENERAL] INTERVAL data type and libpq - what format?

2009-05-19 Thread Sebastien FLAESCH
ote: On Tue, May 19, 2009 at 8:17 AM, Sebastien FLAESCH wrote: Yes, good point. I realize now that I would have expected libpq to give me a way to specify the exact decoration or precision of INTERVAL parameters... As you can do with ODBC's SQLBindParameter(), where you specify the C type,

Re: [GENERAL] INTERVAL data type and libpq - what format?

2009-05-19 Thread Sebastien FLAESCH
AL SECOND limited to 59 seconds?" Thanks a lot! Seb Sam Mason wrote: On Tue, May 19, 2009 at 10:08:37AM +0200, Sebastien FLAESCH wrote: I try to use the new 8.4 INTERVAL type with libpq, but get crazy with the input formatting rules... I think you're giving the database conflicti

Re: [GENERAL] INTERVAL SECOND limited to 59 seconds?

2009-05-19 Thread Sebastien FLAESCH
Actually it's not limited to the usage of INTERVAL SECOND, I am writing a PostgreSQL driver for our 4GL virtual machine... I need to store all possible Informix INTERVAL types such as: INTERVAL MONTH(8) TO MONTH INTERVAL DAY(8) TO MINUTE INTERVAL SECOND TO FRACTION(5) ... etc ... ..

Re: [GENERAL] INTERVAL SECOND limited to 59 seconds?

2009-05-19 Thread Sebastien FLAESCH
ese phrases: YEAR MONTH DAY HOUR MINUTE SECOND YEAR TO MONTH DAY TO HOUR DAY TO MINUTE DAY TO SECOND HOUR TO MINUTE MINUTE TO SECOND Does that mean that the [field] option of the INTERVAL type is just there to save storage space? Confusing... Seb

[GENERAL] INTERVAL SECOND limited to 59 seconds?

2009-05-19 Thread Sebastien FLAESCH
Hello, Can someone explain this: test1=> create table t1 ( k int, i interval second ); CREATE TABLE test1=> insert into t1 values ( 1, '-67 seconds' ); INSERT 0 1 test1=> insert into t1 values ( 2, '999 seconds' ); INSERT 0 1 test1=> select * from t1; k | i ---+--- 1 | -00:00:07 2

[GENERAL] INTERVAL data type and libpq - what format?

2009-05-19 Thread Sebastien FLAESCH
Hello, I try to use the new 8.4 INTERVAL type with libpq, but get crazy with the input formatting rules... I use PQprepare() / PQexecPrepared() with parameter list, binding the INTERVAL values with the 1186 pg_type and passing a string buffer with values like: "12345" for an INTERVAL YEAR Th

Re: [GENERAL] Suggestion for parameterized queries

2005-03-01 Thread Sebastien FLAESCH
Richard Huxton wrote: Sebastien FLAESCH wrote: Hi, Parameterized queries (PREPARE/EXECUTE), is a great thing, but it would even be better if the DECLARE CURSOR could use a PREPAREd statement, to declare a "server-side" cursor with a parameterized query, to use the benefits of DECLAR

[GENERAL] Suggestion for parameterized queries

2005-02-28 Thread Sebastien FLAESCH
er because of this limitation I could build the SQL statement with literal values, but since you have now parametrized queries I would prefer to use that... Thank you! Sebastien FLAESCH Database driver writer at www.4js.com ---(end of broadcast)---

[GENERAL] Suggestion for parameterized queries

2005-02-28 Thread Sebastien FLAESCH
SQL driver because of this limitation I could build the SQL statement with literal values, but since you have now parametrized queries I would prefer to use that... Thank you! Sebastien FLAESCH Database driver writer at www.4js.com ---(end of broadcast)---