From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bill Moran <wmoran(at)collaborativefusion(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) |
Date: | 2008-11-03 19:53:30 |
Message-ID: | 20081103195330.GX4509@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane escribió:
> However, the interval version of the function can capture the time case
> because there's an implicit cast from time to interval:
>
> regression=# select casttarget::regtype,castcontext,castfunc::regprocedure from pg_cast where castsource = 'time'::regtype;
> casttarget | castcontext | castfunc
> ------------------------+-------------+----------------------------------------
> interval | i | "interval"(time without time zone)
> time with time zone | i | timetz(time without time zone)
> time without time zone | i | "time"(time without time zone,integer)
> (3 rows)
BTW it very much looks like we should have a pg_casts view that displays
these things in a human-readable manner (like the above except with
castcontext expanded)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Jason Long | 2008-11-03 19:59:15 | Re: Debugging infrequent pegged out CPU usage |
Previous Message | Tom Lane | 2008-11-03 19:46:04 | Re: date_trun() with timezones? (was Re: TIME column manipulation/comparison hangups) |