1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-15 05:46:52 +03:00

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
This commit is contained in:
Heikki Linnakangas
2024-08-06 23:03:43 +03:00
parent a890ad2149
commit 1e35951e71
5 changed files with 6 additions and 6 deletions

View File

@@ -1154,7 +1154,7 @@ add_local_string_reloption(local_relopts *relopts, const char *name,
*/
Datum
transformRelOptions(Datum oldOptions, List *defList, const char *namspace,
char *validnsps[], bool acceptOidsOff, bool isReset)
const char *const validnsps[], bool acceptOidsOff, bool isReset)
{
Datum result;
ArrayBuildState *astate;