Re: pg_upgrade failure due to dependencies

From: "Edward J(dot) Sabol" <edwardjsabol(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade failure due to dependencies
Date: 2025-07-01 11:10:36
Message-ID: D305115C-0461-4F41-89EB-3BFCC11C240A@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Jul 1, 2025, at 5:37 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:


Moreover, PostgreSQL cannot check dependencies, since the function was defined using the "old" style for SQL functions, where the function body is just a string.  If they had used the standard conforming new style, PostgreSQL would try to trach dependencies.  Not sure if that would have been enough to avoid the problem, but clearly better.

Just for my edification, how would one create that PostGIS function using the "standard-conforming new style"?

*All* of the examples in PostgeSQL's current documentation are the "old" (string) style at https://www.postgresql.org/docs/18/xfunc-sql.html.




The only example of the new style in the PostgreSQL documentation that I could find is the very trivial second example at https://www.postgresql.org/docs/18/sql-createfunction.html. The other examples on that web page are all the old style.

If the new style is better, perhaps someone should update the PostgreSQL documentation to use it more than just once. More complicated examples of "new style" SQL functions are needed, I feel.

My web searches for more information on "standard-conforming new style" SQL functions were not fruitful. All I kept finding were examples of the "old" kind in the first 3 pages of my search results. Any pointers to useful web pages covering this topic in some detail would be appreciated.

Thanks,

Ed

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2025-07-01 15:30:02 Re: pg_upgrade failure due to dependencies
Previous Message Laurenz Albe 2025-07-01 09:37:06 Re: pg_upgrade failure due to dependencies