X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2131F528C5 for ; Mon, 30 May 2005 11:09:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29900-01 for ; Mon, 30 May 2005 14:08:58 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 79659528B2 for ; Mon, 30 May 2005 11:08:56 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j4UE8wGK045067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 May 2005 08:09:01 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j4UE8wNh078356; Mon, 30 May 2005 08:08:58 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j4UE8wYV078355; Mon, 30 May 2005 08:08:58 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 30 May 2005 08:08:57 -0600 From: Michael Fuhr To: =?iso-8859-1?Q?K=D6PFERL?= Robert Cc: pgsql-sql@postgresql.org Subject: Re: Generic Join on Arrays Message-ID: <20050530140857.GA78280@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/234 X-Sequence-Number: 21547 On Mon, May 30, 2005 at 03:42:49PM +0200, KÖPFERL Robert wrote: > > As I found out, pg_proc relation provides me with data about defined stored > procedures. Togehter with other relations as pg_type I can retrieve readable > information, like: > select proname, pd.description FROM pg_proc pp left outer join > pg_description pd on pp.oid=pd.objoid > > BUT, how about arrays of type "oidvector" (int4-array) containing foreign > keys (to be joined) as pg_proc's column "proargtypes" Have you used ECHO_HIDDEN (or psql -E) to look at the queries that \df generates? Would oidvectortypes() be useful? SELECT proname, oidvectortypes(proargtypes) FROM pg_proc WHERE proname = 'substr'; proname | oidvectortypes ---------+------------------------- substr | bytea, integer substr | text, integer substr | bytea, integer, integer substr | text, integer, integer (4 rows) Another possibility might be to cast the function's oid to regprocedure: SELECT oid::regprocedure FROM pg_proc WHERE proname = 'substr'; oid ------------------------------- substr(bytea,integer) substr(text,integer) substr(bytea,integer,integer) substr(text,integer,integer) (4 rows) Is either of those what you're looking for? They don't address the problem in the general case, but they might serve in this particular case. -- Michael Fuhr http://www.fuhr.org/~mfuhr/