From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Marcelo Lacerda <marceloslacerda(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: check_function_bodies not doing much |
Date: | 2018-08-07 19:38:02 |
Message-ID: | CAKFQuwbWS1u3KZ9sjw9u2h-4y0hSESmAAzf682STpon4OH-NoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Aug 7, 2018 at 12:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Marcelo Lacerda <marceloslacerda(at)gmail(dot)com> writes:
> > I was trying to get postgres to warn me that I'm referencing a table that
> > it doesn't exists inside a function so I was told on the IRC to check the
> > setting "check_function_bodies", however when I use it in a plpgsql
> > function it doesn't actually check if the tables in the body exist. Is
> this
> > the correct behavior?
>
> Yes. It's supposed to be a syntax check, not a check that the function
> would work when executed. (Depending on the particular PL you're using,
> which you didn't mention, it might be a pretty weak syntax check too.)
>
The quoted text includes "however when I use it in a plpgsql function" so
we're good there.
Might be worth updating the docs for the GUC (or a note in the languages
themselves) to mention what the check covers for each of them. At least
distinguishing between syntax and semantics for each.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-08-07 19:47:19 | Re: check_function_bodies not doing much |
Previous Message | Tom Lane | 2018-08-07 19:31:30 | Re: check_function_bodies not doing much |