Re: Converting contrib SQL functions to new style

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Ronan Dunklau <ronan.dunklau@aiven.io>, pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2024-12-14T18:00:00Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> Doing that step-by-step is better than nothing, hence limiting the use
> of named parameters for only the functions whose body is rewritten is
> fine by me, as a first step, as long as the names are used rather the
> dollar parameter numbers.  I'd suggest to do take the bonus step of
> applying the same rule to all the other functions so as everything
> applies with the same extension update in a single major release.
> Perhaps on top of the patches already proposed?  There is no need for
> an extra version bump if all that is done in the same development
> cycle.

FWIW, I don't agree at all with doing argument name addition in
this patchset.  Certainly that's a fine thing to do, but it's an
independent issue and should be handled in an independent patch.

I see that the cfbot is unhappy because it doesn't understand
that some of the patches have been applied already.  I am going
to go ahead and get the earthdistance one done, because we have
a live problem report about that [1].  I'll rebase and repost
the remainder afterwards.

			regards, tom lane

[1] https://www.postgresql.org/message-id/flat/6a6439f1-8039-44e2-8fb9-59028f7f2014%40mailbox.org



Commits

  1. Use @extschema:name@ notation in contrib transform modules.

  2. pg_freespacemap: Fix declaration of pg_freespace(regclass)

  3. contrib/pageinspect: Use SQL-standard function bodies.

  4. contrib/xml2: Use SQL-standard function bodies.

  5. contrib/citext: Use SQL-standard function bodies.

  6. contrib/earthdistance: Use SQL-standard function bodies.

  7. contrib/lo: Use SQL-standard function bodies

  8. xml2: Add tests for functions xpath_nodeset() and xpath_list()

  9. contrib/lo: Add test for function lo_oid()

  10. pg_freespacemap: Use SQL-standard function bodies

  11. Add @extschema:name@ and no_relocate options to extensions.

  12. Make contrib modules' installation scripts more secure.