Re: Calling stored procredure from psycopg2 - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Calling stored procredure from psycopg2
Date
Msg-id CA+mi_8bQ-zDfNcTBKdhneiO1HeS-s171vVgj96AipYf2HJOC7A@mail.gmail.com
Whole thread Raw
In response to Calling stored procredure from psycopg2  (Graeme Gemmill <graeme@gemmill.name>)
Responses Re: Calling stored procredure from psycopg2
List psycopg
On Tue, Jan 23, 2018 at 2:00 PM, Graeme Gemmill <graeme@gemmill.name> 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?

Most likely you are connecting to the wrong database, or to a database
where the function `search_columns()` is not in the `search_path`.

-- Daniele


psycopg by date:

Previous
From: David Fetter
Date:
Subject: Re: Calling stored procredure from psycopg2
Next
From: Graeme Gemmill
Date:
Subject: Re: Calling stored procredure from psycopg2