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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Bill Moran <wmoran(at)collaborativefusion(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))
Date: 2008-11-04 22:52:02
Message-ID: 29441.1225839122@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)commandprompt(dot)com> 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 name?

> Yeah, that sounds good enough ... I seem to recall having used
> casttarget as condition a couple of times, but I think it's a strange
> enough case that it is OK to just modify the query when that's needed;
> normal usage would seem to be what you propose.

Here's a draft patch for this. One possible objection is that the
default behavior changes subtly: only casts whose source types are
visible in the search path will be shown by default. In practice
I doubt that will make any difference, so I didn't bother to try to
avoid it --- we could special-case no pattern but I think it'd look
like a wart before long.

Comments?

regards, tom lane

Attachment Content-Type Size
unknown_filename text/plain 5.0 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2008-11-05 00:23:34 Re: postgresql and Mac OS X
Previous Message Bruce Momjian 2008-11-04 22:45:46 Re: GEQO randomness?