idea, proposal: only preloadable libraries (conditional load)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: idea, proposal: only preloadable libraries (conditional load)
Date: 2009-03-11 10:09:55
Message-ID: 162867790903110309t1272a526p603127f33647143b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2009-03-11 10:39:19 Re: Updates of SE-PostgreSQL 8.4devel patches (r1710)
Previous Message Heikki Linnakangas 2009-03-11 09:25:31 Re: Updates of SE-PostgreSQL 8.4devel patches (r1710)