Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-22 Thread Oliver Siegmar
On Thursday 21 April 2005 15:57, Tom Lane wrote: > I don't think it's a new bug, seeing that I didn't change the code > for the ISO case. > > I see the imprecise result only in the non-integer-datetime case; is > it acting differently for you? You're right - it has nothing to do with your patch. I

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-21 Thread Bruce Momjian
Tom Lane wrote: > Oliver Siegmar <[EMAIL PROTECTED]> writes: > > On Thursday 21 April 2005 15:57, Tom Lane wrote: > >> If it is only the float case, some imprecision is to be expected. > > > So everything is okay? > > Well, it's not necessarily *wrong*, but maybe we could improve it. > The code c

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-21 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: > On Thursday 21 April 2005 15:57, Tom Lane wrote: >> If it is only the float case, some imprecision is to be expected. > So everything is okay? Well, it's not necessarily *wrong*, but maybe we could improve it. The code currently assumes it can print 10

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-21 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: > It removed the bug, but also added a new one (hopefully only one ;-)) I don't think it's a new bug, seeing that I didn't change the code for the ISO case. I see the imprecise result only in the non-integer-datetime case; is it acting differently for yo

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-21 Thread Oliver Siegmar
> I've applied this patch. It removed the bug, but also added a new one (hopefully only one ;-)) ...now with ISO DateStyle - select '2005 years 4 mons 20 days 15 hours 57 mins 12.1 secs ago'::interval; Before your patch: interval ---

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-20 Thread Oliver Siegmar
Hi Tom, On Wednesday 20 April 2005 17:57, Tom Lane wrote: > "Oliver Siegmar" <[EMAIL PROTECTED]> writes: > > select '10.10 secs ago'::interval; > > > > interval > > --- > > @ 10.-10 secs ago > > (1 row) > > What datestyle are you using? Non-ISO (Postgres in that case), but t

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-20 Thread Tom Lane
I've applied this patch. regards, tom lane Index: datetime.c === RCS file: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v retrieving revision 1.137 diff -c -r1.137 datetime.c *** datetime.c 11 Jan 2005 18:

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-20 Thread Tom Lane
Oliver Siegmar <[EMAIL PROTECTED]> writes: >> What datestyle are you using? > Non-ISO (Postgres in that case), but the handling for non-ISO is all the same > in interval.c ... Yeah, I just confirmed here that it's broken the same way in all three non-ISO datestyles. Will look into a fix later to

Re: [BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-20 Thread Tom Lane
"Oliver Siegmar" <[EMAIL PROTECTED]> writes: > select '10.10 secs ago'::interval; > interval > --- > @ 10.-10 secs ago > (1 row) What datestyle are you using? regards, tom lane ---(end of broadcast)---

[BUGS] BUG #1609: Bug in interval datatype for 64 Bit timestamps

2005-04-20 Thread Oliver Siegmar
The following bug has been logged online: Bug reference: 1609 Logged by: Oliver Siegmar Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0.2 Operating system: Linux Description:Bug in interval datatype for 64 Bit timestamps Details: Postgres compiled with --en