Skip to content

Commit 846b5a5

Browse files
committed
Prevent extensions from creating custom GUCs that are GUC_LIST_QUOTE.
Pending some solution for the problems noted in commit 7428699, disallow dynamic creation of GUC_LIST_QUOTE variables. If there are any extensions out there using this feature, they'd not be happy for us to start enforcing this rule in minor releases, so this is a HEAD-only change. The previous commit didn't make things any worse than they already were for such cases. Discussion: https://postgr.es/m/20180111064900.GA51030@paquier.xyz
1 parent 7428699 commit 846b5a5

File tree

1 file changed

+9
-0
lines changed
  • src/backend/utils/misc

1 file changed

+9
-0
lines changed

src/backend/utils/misc/guc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7606,6 +7606,15 @@ init_custom_variable(const char *name,
76067606
!process_shared_preload_libraries_in_progress)
76077607
elog(FATAL, "cannot create PGC_POSTMASTER variables after startup");
76087608

7609+
/*
7610+
* We can't support custom GUC_LIST_QUOTE variables, because the wrong
7611+
* things would happen if such a variable were set or pg_dump'd when the
7612+
* defining extension isn't loaded. Again, treat this as fatal because
7613+
* the loadable module may be partly initialized already.
7614+
*/
7615+
if (flags & GUC_LIST_QUOTE)
7616+
elog(FATAL, "extensions cannot define GUC_LIST_QUOTE variables");
7617+
76097618
/*
76107619
* Before pljava commit 398f3b876ed402bdaec8bc804f29e2be95c75139
76117620
* (2015-12-15), two of that module's PGC_USERSET variables facilitated

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy