[COMMITTERS] pgsql: Invent start_proc parameters for PL/Tcl. - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Invent start_proc parameters for PL/Tcl.
Date
Msg-id E1clJ6W-0000bD-6C@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Invent start_proc parameters for PL/Tcl.

Define GUCs pltcl.start_proc and pltclu.start_proc.  When set to a
nonempty value at the time a new Tcl interpreter is created, the
parameterless pltcl or pltclu function named by the GUC is called to
allow user-controlled initialization to occur within the interpreter.
This is modeled on plv8's start_proc parameter, and also has much in
common with plperl's on_init feature.  It allows users to fully
replace the "modules" feature that was removed in commit 817f2a586.

Since an initializer function could subvert later Tcl code in nearly
arbitrary ways, mark both GUCs as SUSET for now.  It would be nice
to find a way to relax that someday; but the corresponding GUCs in
plperl are also SUSET, and there's not been much complaint.

Discussion: https://postgr.es/m/22067.1488046447@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0d2b1f305dc78d536d80cfb4bb2ac4d7104453db

Modified Files
--------------
doc/src/sgml/pltcl.sgml                  |  74 ++++++++++++++
src/pl/tcl/Makefile                      |   2 +-
src/pl/tcl/expected/pltcl_start_proc.out |  31 ++++++
src/pl/tcl/pltcl.c                       | 167 +++++++++++++++++++++++++++++--
src/pl/tcl/sql/pltcl_start_proc.sql      |  21 ++++
5 files changed, 286 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Clean up test_ifaddrs a bit.
Next
From: Fabien COELHO
Date:
Subject: Re: [COMMITTERS] pgsql: Fix pgbench's failure to honor the documentedlong-form option "