Re: Calling stored procredure from psycopg2 - Mailing list psycopg

From Rory Campbell-Lange
Subject Re: Calling stored procredure from psycopg2
Date
Msg-id 20180123175427.24yqbh4eh7xgv4ul@campbell-lange.net
Whole thread Raw
In response to Re: Calling stored procredure from psycopg2  (Graeme Gemmill <graeme@gemmill.name>)
Responses Re: Calling stored procredure from psycopg2
List psycopg
On 23/01/18, Graeme Gemmill (graeme@gemmill.name) wrote:
> Daniele: What would be the 'search_path'? 

Each database can have several schemas. To access schemas outside of the
default 'public' schema, you need to set the search_path.

https://www.postgresql.org/docs/current/static/runtime-config-client.html

If you are trying to use functions or data outside of the public schema
you can normally do so by either running something like

    dbcur.execute('set search_path = %s' % self.search_path)

or fully qualify the target function or object in your query, eg:

    select * from myschema.fn_myfunction(myschema.toys)

Rory


psycopg by date:

Previous
From: Ed Behn
Date:
Subject: Re: Calling stored procredure from psycopg2
Next
From: Graeme
Date:
Subject: Re: Calling stored procredure from psycopg2