dbTalk Databases Forums  

Re: UNIX timestamps

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Re: UNIX timestamps in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott Marlowe
 
Posts: n/a

Default Re: UNIX timestamps - 07-29-2004 , 02:28 AM






On Wed, 2004-07-28 at 17:38, Eduardo Vázquez RodrĂ*guez wrote:
Quote:
Hi everyone out there using Postgres

Is there a data type or function in Postgres to handle UNIX
timestamps?

I have to handle datea in unix timestamp format like this
1079092862.453 and I would like to be inserted in human readable way

Any suggestions are welcome
Do you need speed or precision?

For max speed, use an int4 and drop the non-integer part.

For good speed, use floats. They're pretty close and fair to middling
on performance.

For best precision, but slowest speeds, use numeric(18,3) or something
like that. Whatever the maximum size you have to deal with.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.