Re: function doesn't see change in search_path

From: Richard Huxton <dev(at)archonet(dot)com>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: function doesn't see change in search_path
Date: 2011-11-07 20:11:17
Message-ID: 4EB83B65.7080608@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/11/11 14:43, Ivan Sergio Borgonovo wrote:
>
> create or replace function test_insert() returns void as
[snip]
> $$ language plpgsql volatile;
>
> set search_path to 'test1', 'public';

> set search_path to 'test2', 'public';
[snip unexpected behaviour]

I now try to add a SET search_path to the bottom of all my plpgsql
functions. It can get very confusing otherwise, as you've just demonstrated.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message pasman pasmański 2011-11-07 20:13:58 Www emulator
Previous Message Richard Huxton 2011-11-07 20:07:08 Re: function within a function/rollbacks/exception handling