Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2B650632AFC for ; Tue, 10 Aug 2010 14:42:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 70918-04 for ; Tue, 10 Aug 2010 17:42:38 +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 D4820632712 for ; Tue, 10 Aug 2010 14:42:38 -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 o7AHgboq003158; Tue, 10 Aug 2010 13:42:37 -0400 (EDT) To: Imre Horvath cc: pgsql-sql@postgresql.org Subject: Re: type cast In-reply-to: <1281458286.7072.2.camel@cytherian.blemidon.dyndns.org> References: <1281458286.7072.2.camel@cytherian.blemidon.dyndns.org> Comments: In-reply-to Imre Horvath message dated "Tue, 10 Aug 2010 18:38:06 +0200" Date: Tue, 10 Aug 2010 13:42:37 -0400 Message-ID: <3157.1281462157@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/45 X-Sequence-Number: 34485 Imre Horvath writes: > I've got a plpython function, with a character varying param. > I can call it from sql. > But when i try to call it with psycopg2.callproc('testfunc', ['test']), > i've got the error: > function testfunc(unknown) does not exist > HINT: No function matches the given name and argument types. You might > need to add explicit type casts. That doesn't sound like a type cast issue. I'd bet you connected to the wrong database from your python app, or are using a different search_path setting, or something along that line. regards, tom lane