Mark pg_config() stable rather than immutable
authorJoe Conway <[email protected]>
Sun, 17 Feb 2019 14:21:13 +0000 (09:21 -0500)
committerJoe Conway <[email protected]>
Sun, 17 Feb 2019 14:21:13 +0000 (09:21 -0500)
pg_config() has been marked immutable since its inception. As part of a
larger discussion around the definition of immutable versus stable and
related implications for marking functions parallel safe raised by
Andres, the consensus was clearly that pg_config() is stable, since
it could possibly change output even for the same minor version with
a recompile or installation of a new binary. So mark it stable.

Theoretically this could/should be backed, but it was deemed to be not
worth the effort since in practice this is very unlikely to cause problems
in the real world.

Discussion: https://postgr.es/m/20181126234521[email protected]

src/include/catalog/pg_proc.dat

index 24f99f7fc459d4f98a31c35d1c9b343df5815465..a4e173b4846835ececf618f52d3783c8f75f2204 100644 (file)
 
 # pg_config
 { oid => '3400', descr => 'pg_config binary as a function',
-  proname => 'pg_config', prorows => '23', proretset => 't', proparallel => 'r',
+  proname => 'pg_config', provolatile => 's', prorows => '23', proretset => 't', proparallel => 'r',
   prorettype => 'record', proargtypes => '', proallargtypes => '{text,text}',
   proargmodes => '{o,o}', proargnames => '{name,setting}',
   prosrc => 'pg_config' },