Re: [BUGS] BUG #4878: function age() give a wrong interval

2009-06-25 Thread Tom Lane
"Philippe Amelant" writes: > In the first case you have a month with 31 days and in the second you > have a month with 30 days The interval comparisons have no way to know that, so they arbitrarily assume that '1 month' is equivalent to '30 days'. This isn't going to be changed. If you don't li

Re: [BUGS] BUG #4878: function age() give a wrong interval

2009-06-25 Thread Frank Heikens
The problem is the definition of a month. That can be 28, 29, 30 or 31 days. This is what the manual says about age(): age(timestamp, timestamp) interval Subtract arguments, producing a "symbolic" result that uses years and months So, it's just a symbolic age, not an exact age. The same occu

Re: [BUGS] BUG #4878: function age() give a wrong interval

2009-06-25 Thread Philippe Amelant
Le jeudi 25 juin 2009 à 11:40 +0200, Frank Heikens a écrit : > select > age( > '2009-06-23 18:36:05.064066+02' , > '2009-05-12 18:36:05.064066+02') ; > > Result: "1 mon 11 days" > > select justify_interval('1000 hours'); > > Result: "1 mon 11 days 16:00:00" > >

Re: [BUGS] BUG #4878: function age() give a wrong interval

2009-06-25 Thread Frank Heikens
select age( '2009-06-23 18:36:05.064066+02' , '2009-05-12 18:36:05.064066+02') ; Result: "1 mon 11 days" select justify_interval('1000 hours'); Result: "1 mon 11 days 16:00:00" select age( '2009-06-23 18:36:05.064066+02' ,

[BUGS] BUG #4878: function age() give a wrong interval

2009-06-25 Thread
The following bug has been logged online: Bug reference: 4878 Logged by: Email address: pamel...@companeo.com PostgreSQL version: 8.2.4, 8.3.6 Operating system: linux Description:function age() give a wrong interval Details: age() report a wrong interval in some ca