Re: Followup from yesterday's PL/pgSQL fun...

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Followup from yesterday's PL/pgSQL fun...
Date: 2003-05-14 18:03:47
Message-ID: 271440000.1052935427@lerlaptop-red.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--On Wednesday, May 14, 2003 13:08:23 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Larry Rosenman <ler(at)lerctr(dot)org> writes:
>>> Actually, I think you can do it with CREATE CAST.
>
>> The issue (for me) was decoding the function name(s).
>
> I find the 7.3 OID-alias types very helpful for this sort of thing:
>
> regression=# select castsource::regtype, casttarget::regtype,
> castfunc::regprocedure, castcontext from pg_cast limit 1; castsource |
> casttarget | castfunc | castcontext
> ------------+------------+--------------+-------------
> bigint | smallint | int2(bigint) | a
> (1 row)
>
>> I wish there was a \ command to display pg_cast...
>
> There is (\dC). But it's not very bright --- I don't think you can
> limit the rows displayed at all.
$ psql
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

ler=# \dC
Did not find any relation named "C".
ler=#

Hrm.
>
> regards, tom lane

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-05-14 18:13:12 Re: Followup from yesterday's PL/pgSQL fun...
Previous Message Richard Huxton 2003-05-14 18:01:51 Re: Type coercion on column in a query