dbTalk Databases Forums  

[BUGS] Why is abstime type deprecated?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Why is abstime type deprecated? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kilian Hagemann
 
Posts: n/a

Default [BUGS] Why is abstime type deprecated? - 10-27-2004 , 08:46 AM






Hi there,

Firstly, I am new to PostgreSQL but installed it recently because of its many
virtues for a project of mine. This is not a bug-report but rather a concern
about the development course of postgresql (hope this is the right place to
post this... please excuse me if it's not).

I am busy storing lots of weather station data into a database, each record
having a timestamp. Now the 'timestamp' type that PostgreSQL (and MySQL for
that matter) offers is 8 bytes long. Space is of the essence, and I found
that if I could use a 4 byte timestamp instead I could reduce the amount of
real (non-overhead) data in my db by 33%.

After long googling I found that abstime, as was still current in 6.x, would
do the trick for me. But the 7.x documentation says "You are discouraged from
using these types in new applications" and that "Any or all of these internal
types might disappear in a future release". The Version 8.0 History file
makes no indication of abstime disappearing, but I'm still worried about
implementing my database with abstime. Why is it deprecated? If it's not, why
does the documentation say it is?

I believe SQL standards come into play here but one could always keep abstime
as a PostgreSQL extension...

I don't need more than 1s resolution and such a type ideally satisfies the
requirements of my application. Quite frankly, I think that there aren't many
people out there who would require a microsecond precision and a date range
of 292000 years into the future...

Regards,

--
Kilian Hagemann

Climate Systems Analysis Group
University of Cape Town
Republic of South Africa
Tel(w): ++27 21 650 2748

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Why is abstime type deprecated? - 10-27-2004 , 09:45 AM






Kilian Hagemann <hagemann1 (AT) egs (DOT) uct.ac.za> writes:
Quote:
After long googling I found that abstime, as was still current in 6.x, would
do the trick for me. But the 7.x documentation says "You are discouraged from
using these types in new applications" and that "Any or all of these internal
types might disappear in a future release". The Version 8.0 History file
makes no indication of abstime disappearing, but I'm still worried about
implementing my database with abstime. Why is it deprecated?
Because it will certainly break by 2038, when 32-bit time_t overflows.

In practice, Unix systems will have to move to 64-bit time_t before
that, and we'll probably either remove abstime or make it an 8-byte type
as soon as that practice is common.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #3  
Old   
Kilian Hagemann
 
Posts: n/a

Default Re: [BUGS] Why is abstime type deprecated? - 10-27-2004 , 10:09 AM



Quote:
Because it will certainly break by 2038, when 32-bit time_t overflows.

In practice, Unix systems will have to move to 64-bit time_t before
that, and we'll probably either remove abstime or make it an 8-byte type
as soon as that practice is common.
Thanks for that. By that time my storage requirements will certainly have
changed, but I guess this transformation won't happen in a hurry... I'd like
to see abstime supported until at least 2020.

Quote:
TIP 5: Have you checked our extensive FAQ?
I have, and it doesn't have an entry on this. Don't know who maintains the
FAQ, but I think it would be worthwhile adding this issue to the FAQ.

--
Kilian Hagemann

Climate Systems Analysis Group
University of Cape Town
Republic of South Africa
Tel(w): ++27 21 650 2748

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] Why is abstime type deprecated? - 10-27-2004 , 02:13 PM



Kilian Hagemann wrote:
Quote:
Because it will certainly break by 2038, when 32-bit time_t overflows.

In practice, Unix systems will have to move to 64-bit time_t before
that, and we'll probably either remove abstime or make it an 8-byte type
as soon as that practice is common.

Thanks for that. By that time my storage requirements will certainly have
changed, but I guess this transformation won't happen in a hurry... I'd like
to see abstime supported until at least 2020.

TIP 5: Have you checked our extensive FAQ?

I have, and it doesn't have an entry on this. Don't know who maintains the
FAQ, but I think it would be worthwhile adding this issue to the FAQ.
It is not an F(frequent)AQ because you are the first to ask about it in
perhaps years.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


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.