| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: SQL-standard function body |
| Date: | 2020-07-01 14:19:50 |
| Message-ID: | CAFj8pRC_Ck_EiPg6dYxOW1v_d7t=PbfBoD-urOoFKfb+mEe2=g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
st 1. 7. 2020 v 16:14 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > In my experience, there's certainly demand for some kind of mode where
> > plpgsql functions get checked at function definition time, rather than
> > at execution time.
>
> Yeah, absolutely agreed. But I'm afraid this proposal takes us too
> far in the other direction: with this, you *must* have a 100% parseable
> and semantically valid function body, every time all the time.
>
> So far as plpgsql is concerned, I could see extending the validator
> to run parse analysis (not just raw parsing) on all SQL statements in
> the body. This wouldn't happen of course with check_function_bodies off,
> so it wouldn't affect dump/reload. But likely there would still be
> demand for more fine-grained control over it ... or maybe it could
> stop doing analysis as soon as it finds a DDL command?
>
This simple analysis stops on first record type usage. PLpgSQL allows some
dynamic work that increases the complexity of static analysis.
Regards
Pavel
> regards, tom lane
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2020-07-01 14:40:09 | Re: estimation problems for DISTINCT ON with FDW |
| Previous Message | Tom Lane | 2020-07-01 14:14:10 | Re: SQL-standard function body |