"Cornelia Boenigk" <poppcorn@cornelia-boenigk.de> writes:
> To convert PostgreSQL timestmp to UNIX timestamp I use
> select ((today::abstime)::int4) from table ...
> In the documentation there is a notice that abstime shouldn't be used.
> Is there another way to convert?
"SELECT EXTRACT(EPOCH FROM timestamp)" is the recommended way to do it.
> Also I tried
> select timetz_hash(today) from table ..
> and got negative values for some timestamps. Does anybody know why?
Why not? If the hash function didn't use all 32 available bits, I'd
think it faulty ...
regards, tom lane