]> begriffs open source - ai-pg/blob - full-docs/txt/pltcl-config.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / pltcl-config.txt
1
2 42.11. PL/Tcl Configuration #
3
4    This section lists configuration parameters that affect PL/Tcl.
5
6    pltcl.start_proc (string) #
7           This parameter, if set to a nonempty string, specifies the name
8           (possibly schema-qualified) of a parameterless PL/Tcl function
9           that is to be executed whenever a new Tcl interpreter is created
10           for PL/Tcl. Such a function can perform per-session
11           initialization, such as loading additional Tcl code. A new Tcl
12           interpreter is created when a PL/Tcl function is first executed
13           in a database session, or when an additional interpreter has to
14           be created because a PL/Tcl function is called by a new SQL
15           role.
16
17           The referenced function must be written in the pltcl language,
18           and must not be marked SECURITY DEFINER. (These restrictions
19           ensure that it runs in the interpreter it's supposed to
20           initialize.) The current user must have permission to call it,
21           too.
22
23           If the function fails with an error it will abort the function
24           call that caused the new interpreter to be created and propagate
25           out to the calling query, causing the current transaction or
26           subtransaction to be aborted. Any actions already done within
27           Tcl won't be undone; however, that interpreter won't be used
28           again. If the language is used again the initialization will be
29           attempted again within a fresh Tcl interpreter.
30
31           Only superusers can change this setting. Although this setting
32           can be changed within a session, such changes will not affect
33           Tcl interpreters that have already been created.
34
35    pltclu.start_proc (string) #
36           This parameter is exactly like pltcl.start_proc, except that it
37           applies to PL/TclU. The referenced function must be written in
38           the pltclu language.