pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Larry Rosenman <ler@lerctr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Followup from yesterday's PL/pgSQL fun...
Date: Wed, 14 May 2003 13:08:23 -0400
Message-ID: <25363.1052932103@sss.pgh.pa.us> (raw)
In-Reply-To: <205620000.1052931835@lerlaptop-red.iadfw.net>
References: <177190000.1052930499@lerlaptop-red.iadfw.net>
	<25250.1052931519@sss.pgh.pa.us>
	<25296.1052931768@sss.pgh.pa.us>
	<205620000.1052931835@lerlaptop-red.iadfw.net>

Larry Rosenman <ler@lerctr.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.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <25363.1052932103@sss.pgh.pa.us>
Permalink:  ../25363.1052932103@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25363.1052932103@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ler@lerctr.org
  Subject: Re: Followup from yesterday's PL/pgSQL fun...
  In-Reply-To: <25363.1052932103@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox