Re: Language-specific initialization actions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Language-specific initialization actions
Date: 2002-05-21 00:08:24
Message-ID: 16402.1021939704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> In ProcedureCreate() (backend/catalog/pg_proc.c) there are special cases
> for the built-in languages that check whether the to-be-created function
> has a valid body. ISTM that we could extend that for user-defined
> functions, as follows.

> When creating a language, the user can optionally register a "check"
> function for the language, whose responsibility is to check the supplied
> function body for correctness and return a Boolean result. This function
> would be executed at the time the function is created.

Are you planning to also move the existing special cases out to
functions called through this same interface? That would make pg_proc.c
a lot cleaner, I think.

I don't see any value in returning a boolean; might as well let the
thing just throw an elog --- with, one hopes, an error message somewhat
more specific than "bad function body".

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-21 02:47:40 Re: [SQL] Bug with Daylight Savings Time & Interval
Previous Message Manuel Sugawara 2002-05-21 00:08:07 Re: Redhat 7.3 time manipulation bug