Re: Schema/ROLE Rename Issue

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Brajendra Pratap Singh <singh(dot)bpratap766(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Schema/ROLE Rename Issue
Date: 2020-09-09 14:09:40
Message-ID: d9e807ab594e886f20adf577e0f3438e12668648.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2020-09-09 at 17:04 +0530, Brajendra Pratap Singh wrote:
> Recently we had renamed schema and role but it will not get reflect in the object definitions ,plz suggest.
>
> OLD SCHEMA/ROLE - TEST11
> NEW SCHEMA/ROLE - TEST
>
> But still we are that TEST11 is present in the definition of sone objects like procudure,functions,triggers etc, so how can we modify the name from TEST11 to TEST in definition.
>

You cannot habe that automatically.

While in view and index definitions as well as column default clauses,
the internal object identifier is used, so that renaming doesn't break
anything, functions are stored as string literals and parsed at
execution time.

You'll have to edit all your functions (or undo the renaming).

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brajendra Pratap Singh 2020-09-09 14:20:29 Re: Schema/ROLE Rename Issue
Previous Message Stephen Frost 2020-09-09 13:59:28 Re: Autovacuum of independent tables