Re: Stored procedures and schema renames

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Florian Weimer <fweimer(at)redhat(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Stored procedures and schema renames
Date: 2014-04-10 13:29:17
Message-ID: 0A0C6DA1-11D3-4075-9B3C-C50DB3103A6F@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Code for db functions should be a repository. Easy edit and rerun

Sent from my iPhone

> On Apr 10, 2014, at 6:19 AM, Florian Weimer <fweimer(at)redhat(dot)com> wrote:
>
> I would like to rename schemas without breaking the stored procedures in them. Currently, this does not work if the stored procedure definition contains a schema self-reference because that does not get renamed. I tried "SET search_path FROM CURRENT", but that seems to expand the search path on function definition time, which does not address this issue either.
>
> If backend code changes are required, what would be a reasonable way to approach this? Would adding a CURRENT_SCHEMA pseudo-schema which can be used in stored procedures work?
>
> --
> Florian Weimer / Red Hat Product Security Team
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guy Helmer 2014-04-10 13:50:31 Re: encrypting data stored in PostgreSQL
Previous Message Rob Sargent 2014-04-10 13:25:50 Re: About upgrading a (tuple?) lock in a rollback'd sub-transaction