Search Postgresql Archives

Re: check_function_bodies not doing much

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 7, 2018 at 12:31 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Marcelo Lacerda <marceloslacerda@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux