Re: Timestamp

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bench(at)silentmedia(dot)com
Cc: "Boget, Chris" <chris(at)wild(dot)net>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Timestamp
Date: 2003-01-07 04:51:52
Message-ID: 10115.1041915112@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben <bench(at)silentmedia(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message carl garland 2003-01-07 06:30:25 Re: Have people taken a look at pgdiff yet?
Previous Message Justin Clift 2003-01-07 04:39:08 Have people taken a look at pgdiff yet?