X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D1951476424 for ; Wed, 14 May 2003 13:08:34 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 02403-01 for ; Wed, 14 May 2003 13:08:30 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DACB3476417 for ; Wed, 14 May 2003 13:08:28 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4EH8NU6025364; Wed, 14 May 2003 13:08:24 -0400 (EDT) To: Larry Rosenman Cc: pgsql-sql@postgresql.org Subject: Re: Followup from yesterday's PL/pgSQL fun... 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> Comments: In-reply-to Larry Rosenman message dated "Wed, 14 May 2003 12:03:55 -0500" Date: Wed, 14 May 2003 13:08:23 -0400 Message-ID: <25363.1052932103@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/294 X-Sequence-Number: 13459 Larry Rosenman 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