X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C49915526B for ; Fri, 4 Mar 2005 15:16:49 +0000 (GMT) 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 91963-03 for ; Fri, 4 Mar 2005 15:16:42 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EAAD95513E for ; Fri, 4 Mar 2005 15:16:41 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j24FGkcT027426; Fri, 4 Mar 2005 10:16:46 -0500 (EST) To: b t Cc: pgsql-interfaces@postgresql.org Subject: Re: how to parse an proargtypes array? In-reply-to: <20050304073402.39231.qmail@web61010.mail.yahoo.com> References: <20050304073402.39231.qmail@web61010.mail.yahoo.com> Comments: In-reply-to b t message dated "Thu, 03 Mar 2005 23:34:02 -0800" Date: Fri, 04 Mar 2005 10:16:46 -0500 Message-ID: <27425.1109949406@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/8 X-Sequence-Number: 5337 b t writes: > I'm trying to find out all the argument type that a user-defined function required, I used this query, select proargtypes from pg_proc where proname = 'add_movie'; but it gives me an oidvector array 1043 23 1043 1043 1043 1015 1015 1015 1182 1015, is there a query to parse this and give me a list of type. Perhaps the regprocedure output converter will help you. Forget proargtypes, just cast the function's OID to regprocedure. If you really want to deal with the individual function argument type OIDs, regtype would help with converting those to useful text; or see format_type(). regards, tom lane