Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure
Date
Msg-id c1d9adea-f80c-4ea7-d8a4-efdceb277bb2@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] I propose killing PL/Tcl's "modules" infrastructure  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.

<begin creature-feep>
BTW, I'd think this functionality would be valuable for every PL. Maybe 
it's worth adding formal support for it to pg_language et all and leave 
it up to each language to decide whether it's supported or not? Multiple 
init functions might be useful too, similar to how we support multiple 
hook functions (though presumably a field of regproc[] is a better way 
to handle that...)

I'm also wondering if there'd be value to supporting code that runs on 
each function invocation.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Next
From: Jim Nasby
Date:
Subject: Re: [HACKERS] Two questions about Postgres parser