Re: plpgsql_check_function - rebase for 9.3

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Steve Singer <steve(at)ssinger(dot)info>
Subject: Re: plpgsql_check_function - rebase for 9.3
Date: 2013-12-12 07:33:30
Message-ID: CAFj8pRDWdeWfeM3pOmuVpbsW4JUZTV=uWen98at_BJGPxFY8OA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I dislike it. a too early check means a issues with temporary tables and
mainy new dependency between functions in complex projects. It is some what
we don't want.
Dne 12. 12. 2013 5:30 "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com> napsal(a):

> On Wed, Dec 11, 2013 at 10:40 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> >> On Tue, Dec 10, 2013 at 12:15 PM, Pavel Stehule <
> pavel(dot)stehule(at)gmail(dot)com> wrote:
> >>> Now, PG has no any tool for checking dependency between functions and
> other
> >>> objects.
> >
> >> Isn't that already done for SQL function's (fmgr_sql_validator)?
> >
> > Pavel's point is that the only way to find out if the validator will fail
> > is to run it and see if it fails; and even if it does, how much will you
> > know about why?
>
> One of the important thing at time of function creation, users are
> interested in knowing
> is that if there are any objects (table/view/sequence ..) that are
> used in function body
> and are missing and the reason is I think they don't want such
> things to come up during execution.
>
> Similar thing happens for prepared statements in PostgreSQL, like
> at time of parse message
> only it checks both syntax errors and semantic check (which ensures
> statement is meaningful,
> for ex. whether objects and columns used in the statements exist)
>
> Like we do checks other than syntax check at time of creation of
> prepared statement, same
> thing should be considered meaning full at time of function creation.
>
> As you mentioned, there are checks (like dependency, mutual
> recursion) which are difficult or not
> feasible in current design to perform, but so will be the case for
> them to execute during first execution
> of function. So is it not better to do what is more feasible during
> function creation rather than leaving
> most of the things at execution phase?
>
>
> With Regards,
> Amit Kapila.
> EnterpriseDB: http://www.enterprisedb.com
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-12-12 07:42:44 Re: In-Memory Columnar Store
Previous Message Tatsuo Ishii 2013-12-12 07:28:31 Re: pgbench with large scale factor