Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Admin > Re: how to get ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 9 Topic 4977 of 5411
Post > Topic >>

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

by tgl@[EMAIL PROTECTED] (Tom Lane) May 12, 2008 at 11:09 AM

Achilleas Mantzios <achill@[EMAIL PROTECTED]
> writes:
> Στις Monday 12 May 2008 17:32:39 ο/η Julius Tuskenis έγραψε:
>> do you know why division of intervals was not implemented? As I see it
- 
>> there should be an easy way to do so. '1 hour 30 minutes' / '1 hour' = 
>> 1.5 .... Seems straight forward...
>> 
> No idea why. However as you pose it,it makes sense.

No, it doesn't really, because intervals contain multiple components.
What would you define as the result of
	'1 month 1 hour' / '1 day'
bearing in mind that the number of days per month is not fixed, and
neither is the number of hours per day?

You can derive a number if you're willing to make arbitrary assumptions
about the relation****ps of the different units (as indeed extract(epoch)
does), but hard-wiring such assumptions into a basic arithmetic operator
doesn't seem like a good idea to me.

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
 




 9 Posts in Topic:
how to get a number of seconds in some interval ?
julius@[EMAIL PROTECTED]   2008-05-12 16:44:16 
Re: how to get a number of seconds in some interval ?
achill@[EMAIL PROTECTED]   2008-05-12 17:24:38 
Re: how to get a number of seconds in some interval ?
achill@[EMAIL PROTECTED]   2008-05-12 18:01:34 
Re: how to get a number of seconds in some interval ?
tgl@[EMAIL PROTECTED] (T  2008-05-12 11:09:11 
Re: how to get a number of seconds in some interval ?
julius@[EMAIL PROTECTED]   2008-05-13 09:20:09 
Re: how to get a number of seconds in some interval ?
achill@[EMAIL PROTECTED]   2008-05-13 09:56:50 
Re: how to get a number of seconds in some interval ?
pgsql@[EMAIL PROTECTED]   2008-05-13 18:12:41 
Re: how to get a number of seconds in some interval ?
tgl@[EMAIL PROTECTED] (T  2008-05-13 10:15:27 
Re: how to get a number of seconds in some interval ?
scott.marlowe@[EMAIL PROT  2008-05-13 02:48:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 9:54:10 CDT 2008.