Skip site navigation (1) Skip section navigation (2)

Re: how to get a number of seconds in some interval ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, Julius Tuskenis <julius(at)nsoft(dot)lt>
Subject: Re: how to get a number of seconds in some interval ?
Date: 2008-05-13 14:15:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> writes:
> So it seems that the arbitary assumption of (1 month=30 days, and 1 day = 24 hours) has already been made in the extract function.

Right, as I said:

>> You can derive a number if you're willing to make arbitrary assumptions
>> about the relationships of the different units (as indeed extract(epoch)
>> does),

The point is that we don't want to propagate that bogus assumption
further than we have to.  EXTRACT() already implies loss of information,
so it's reasonable for it to deliver a simplified view of reality, but
it doesn't follow that division should.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: Robert LorDate: 2008-05-13 17:14:08
Subject: Re: Postgres Cluster on Solaris
Previous:From: Travis SmithDate: 2008-05-13 14:04:21
Subject: Re: EDB database link to Oracle

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group