Re: ALTER SCHEMA: renaming does not update string-literal function bodies

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: ben(at)mlabs(dot)city, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: ALTER SCHEMA: renaming does not update string-literal function bodies
Date: 2026-10-09 21:07:37
Message-ID: CAKFQuwaQ0hXa9VJYMR6=JOPnY3n+n+xE5ZGThiB8XuF4V--Nng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Fri, Oct 9, 2026 at 1:42 PM PG Doc comments form <noreply(at)postgresql(dot)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.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2026-10-09 21:22:27 Re: ALTER SCHEMA: renaming does not update string-literal function bodies
Previous Message David G. Johnston 2026-10-09 19:38:55 Re: Documentation improvement patch