Re: Timestamp - Mailing list pgsql-general

From Tom Lane
Subject Re: Timestamp
Date
Msg-id 10115.1041915112@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timestamp  (Ben <bench@silentmedia.com>)
List pgsql-general
Ben <bench@silentmedia.com> writes:
> You want stuff like last_login::int4::abstime
> This should be a FAQ, because I also spent forever in frustration until
> somebody helped me out with the above, which I've since passed on to
> many people.

BTW: as of 7.3 the available casts are directly documented by the
pg_cast system catalog.  Development sources (7.4-to-be) have a \dC
command to display pg_cast's contents conveniently, but in 7.3 you can
do it the hard way:

    select castsource::regtype, casttarget::regtype from pg_cast;

In prior versions you could look in pg_proc for conversion functions,
but this did not tell you about binary-equivalence casts.

            regards, tom lane

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Have people taken a look at pgdiff yet?
Next
From: "carl garland"
Date:
Subject: Re: Have people taken a look at pgdiff yet?