Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CDA1E632E76 for ; Fri, 30 Oct 2009 01:45:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 37584-01 for ; Fri, 30 Oct 2009 04:44:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E32C163259D for ; Fri, 30 Oct 2009 01:44:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n9U4iqs0001312; Fri, 30 Oct 2009 00:44:52 -0400 (EDT) To: Thomas Kellerer cc: pgsql-sql@postgresql.org Subject: Re: pg_get_functiondef and overloaded functions In-reply-to: References: Comments: In-reply-to Thomas Kellerer message dated "Fri, 30 Oct 2009 00:12:26 +0100" Date: Fri, 30 Oct 2009 00:44:52 -0400 Message-ID: <1311.1256877892@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.809 tagged_above=-10 required=5 tests=AWL=-0.699, BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 200910/143 X-Sequence-Number: 33342 Thomas Kellerer writes: > I tried > select pg_get_functiondef('foo(int)'::regproc) > select pg_get_functiondef('foo(int4)'::regproc) > select pg_get_functiondef('foo(integer)'::regproc) > but each time I get the error: function "foo(integer)" does not exist > What am I missing? You need to use regprocedure. regproc is mainly for bootstrap purposes --- it accepts a function name only. regards, tom lane