Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Maybe we should just agree that its argument is a pattern for the >> castsource type's name? > I'd say it could be a pattern for both source and target. Often times I > am interested in casts in either direction. Well, it makes t

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Could we change the data types of the pg_cast table to regprocedure and > regtype instead? Back when we first introduced the reg-foo types, there was some discussion of changing all relevant catalog columns to those types, but the idea crashed and bu

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Peter Eisentraut
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Tom Lane escribi�: regression=# select casttarget::regtype,castcontext,castfunc::regprocedure from pg_cast where castsource = 'time'::regtype; BTW it very much looks like we should have a pg_casts view that displays these things in

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-05 Thread Peter Eisentraut
Alvaro Herrera wrote: 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;

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-04 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> There already is a \dC command in psql, which has nice enough output >> format but doesn't provide any way to select a subset of the table. >> Maybe we should just agree that its argument is a pattern for the >> castsource type's n

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-03 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Tom Lane escribi�: > >> regression=# select casttarget::regtype,castcontext,castfunc::regprocedure > >> from pg_cast where castsource = 'time'::regtype; > > > BTW it very much looks like we should have a pg_casts view that displa

Re: pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> regression=# select casttarget::regtype,castcontext,castfunc::regprocedure >> from pg_cast where castsource = 'time'::regtype; > BTW it very much looks like we should have a pg_casts view that displays > these things in a human-re

pg_casts view (was Re: date_trun() with timezones? (was Re: [GENERAL] TIME column ...))

2008-11-03 Thread Alvaro Herrera
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; >castta