I have one question. Why PostgreSQL hasn’t implicit casting of timestamps as bigint? We all know that timestamps are stored as eight-byte integers. Yeah, I know that they can be stored as double precision floating-point, but this is deprecated option.
So on my server I successfully executed such thing:
CREATE CAST (timestamp AS bigint) WITHOUT FUNCTION; CREATE CAST (timestamptz AS bigint) WITHOUT FUNCTION;