Re: Calling stored procredure from psycopg2

From: David Fetter <david(at)fetter(dot)org>
To: Graeme Gemmill <graeme(at)gemmill(dot)name>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Calling stored procredure from psycopg2
Date: 2018-01-23 14:47:43
Message-ID: 20180123144743.GA3977@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Tue, Jan 23, 2018 at 02:00:57PM +0000, Graeme Gemmill wrote:
> Environment is Mageia 5 x86_64, Python 3.4, Postgresql 9.3.20,
> psycopg2-2.7.1
>
> I have a working application that calls an external sql stored procedure
> called search.sql with entry point "search_columns". I access it with the
> statement self.cursor.callproc('search_columns', (target,))
>
> I have moved that application to the following environment: Mageia 6 x86_64,
> Python 3.5, Postgresql 9.6.6, psycopg2-2.7.3.2. I now get an error message:
>
> psycopg2.ProgrammingError: function search_columns(unknown) does not exist
>
> search.sql is in the same directory as other Python modules, so there seems
> to have been a change in how to call stored sql procedures. Can someone help
> please?

That error message implies that PostgreSQL doesn't know about the
input type. Maybe this needs to be done in raw SQL.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2018-01-23 14:56:22 Re: Calling stored procredure from psycopg2
Previous Message Graeme Gemmill 2018-01-23 14:00:57 Calling stored procredure from psycopg2