idea, proposal: only preloadable libraries (conditional load) - Mailing list pgsql-hackers

From Pavel Stehule
Subject idea, proposal: only preloadable libraries (conditional load)
Date
Msg-id 162867790903110309t1272a526p603127f33647143b@mail.gmail.com
Whole thread Raw
Responses Re: idea, proposal: only preloadable libraries (conditional load)  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Hello

I am searching way to extensible parser (actually not bison, only
transformations). I propose parserHook (transformation part). One
Tom's objection is difference between heooked and unhooked parser. It
serious problem.

I have one idea - only preloadable libraries. These libs have to be
specified in local_preload_libraries variable, and cannot be
initialised by LOAD statement. Statement LOAD should by used only for
reload library. Because pre loaded library is initialised before first
SQL statement should be executed, then hook is installed on time and
an behave is consistent. One technique is an calling library's
function "canload" before initialising. When canload returns false,
then dfmgr unloads lib. I thing so this behave complements current
functions PG_init and PG_finit. What I can understand, PG_init, cannot
throw exception or signalise any problems with initialisation.

Ideas, objections?

regards
Pavel Stehule


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1710)
Next
From: Gregory Stark
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1710)