Re: I propose killing PL/Tcl's "modules" infrastructure
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
pgsql-hackers@postgresql.org, Jan Wieck <jan@wi3ck.info>
Date: 2017-03-02T17:59:58Z
Lists: pgsql-hackers
Attachments
- pltcl_start_proc-2.patch (text/x-diff) patch
Jim Nasby <Jim.Nasby@BlueTreble.com> writes: > On 2/27/17 2:42 PM, Tom Lane wrote: >> + SET pltcl.start_proc = 'no_such_function'; >> + select tcl_int4add(1, 2); >> + ERROR: function no_such_function() does not exist > Can the error message be more explicit somehow? Otherwise people will be > quite confused as to where no_such_function() is coming from. After thinking about that for awhile, it seemed like the most useful thing to do is to set up an errcontext callback that will be active throughout execution of the start_proc. That will cover both setup failures like the above, and errors occurring within the start_proc, which could be equally confusing if you think they apply to the function you initially tried to call. v2 patch attached that does it like that. > <begin creature-feep> > BTW, I'd think this functionality would be valuable for every PL. Maybe for some. I see no value in putting anything about it in pg_language though. I don't see that we could share any useful amount of mechanism, and it won't necessarily look the same in every language --- plperl for instance prefers code fragments over procedures. In any case, I'm not going there in this patch. regards, tom lane
Commits
-
Invent start_proc parameters for PL/Tcl.
- 0d2b1f305dc7 10.0 landed
-
Remove PL/Tcl's "module" facility.
- 817f2a586342 10.0 landed
-
Remove all of the libpgtcl and pgtclsh files, including all references to
- 41fa9e9bae60 8.0.0 cited