Re: ALTER SCHEMA: renaming does not update string-literal function bodies - Mailing list pgsql-docs

From David G. Johnston
Subject Re: ALTER SCHEMA: renaming does not update string-literal function bodies
Date
Msg-id CAKFQuwaQ0hXa9VJYMR6=JOPnY3n+n+xE5ZGThiB8XuF4V--Nng@mail.gmail.com
Whole thread
In response to ALTER SCHEMA: renaming does not update string-literal function bodies  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Fri, Oct 9, 2026 at 1:42 PM PG Doc comments form <noreply@postgresql.org> wrote:
"Renaming a schema does not update references to it inside function and
procedure bodies written as string constants, since those are parsed only at
execution time (see CREATE FUNCTION). Views and SQL-standard function bodies
are updated automatically."

Schemas are not special in this regard.  It's mostly incumbent upon the place that breaks this kind of expectation to note its deviating rather than expect one feature to be aware of the implementation details of another.  In short, if the function/language pages don't cover that their string literal queries are not exposed for rename operations or dependency tracking that should be fixed in those locations.

David J.

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Documentation improvement patch
Next
From: Laurenz Albe
Date:
Subject: Re: ALTER SCHEMA: renaming does not update string-literal function bodies