dbTalk Databases Forums  

[BUGS] No error-checking on binary timestamp

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


Discuss [BUGS] No error-checking on binary timestamp in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stephen Frost
 
Posts: n/a

Default [BUGS] No error-checking on binary timestamp - 04-02-2004 , 03:28 PM






--908fPEqrLfqn/Y9U
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Greetings,

Based on some experimentation and reading through the code in:
src/backend/utils/adl/timestamp.c ; it would appear that there's no
error-checking when receiving a binary timestamp. I wouldn't care if
I had figured out the binary timestamp format on the first shot but
apparently I didn't and this happened:

atl=> select * from a5_lan;
ERROR: timestamp out of range

No errors during the insert, but when I tried to select out of the
table I inserted the data into that's what I got. Pretty ugly.
Please fix.

I wouldn't mind some pointers on the proper way to convert from unix
time to timestamp binary format either, btw. I was attempting to do
basically the same thing 'AbsoluteTimeUsecToTimestampTz', but
apparently that's not right.

Stephen

--908fPEqrLfqn/Y9U
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbcolrzgMPqB3kigRAsH8AJsEdRcQEtcYkqLC6yPxRF NA94BMmwCfRHJr
OnygjXd+W4jhHwKFONxfN3U=
=Qo4N
-----END PGP SIGNATURE-----

--908fPEqrLfqn/Y9U--

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.