pgsql: Turn a few 'validnsps' static variables into locals

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Turn a few 'validnsps' static variables into locals
Date: 2024-08-06 20:11:45
Message-ID: E1sbQX3-00315K-7I@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Turn a few 'validnsps' static variables into locals

There was no need for these to be static buffers, local variables work
just as well. I think they were marked as 'static' to imply that they
are read-only, but 'const' is more appropriate for that, so change
them to const.

To make it possible to mark the variables as 'const', also add 'const'
decorations to the transformRelOptions() signature.

Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/54c29fb0-edf2-48ea-9814-44e918bbd6e8@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1e35951e71d37ab6716fa55ba399fbe6df4a7417

Modified Files
--------------
src/backend/access/common/reloptions.c | 2 +-
src/backend/commands/createas.c | 2 +-
src/backend/commands/tablecmds.c | 4 ++--
src/backend/tcop/utility.c | 2 +-
src/include/access/reloptions.h | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message noreply 2024-08-06 21:16:26 pgsql: Tag refs/tags/REL_15_8 was created
Previous Message Jeff Davis 2024-08-06 19:25:26 pgsql: selfuncs.c: use pg_strxfrm() instead of strxfrm().