Re: schema agnostic functions in language sql
| От | Tom Lane |
|---|---|
| Тема | Re: schema agnostic functions in language sql |
| Дата | |
| Msg-id | 19492.1589587436@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: schema agnostic functions in language sql (Rob Sargent <robjsargent@gmail.com>) |
| Ответы |
Re: schema agnostic functions in language sql
|
| Список | pgsql-general |
Rob Sargent <robjsargent@gmail.com> writes:
> I cannot create a plain sql function unless the search_path covers any
> table mentioned. Not the case when using plpgsql - no path needed.
Oh, one of the things that's quite a lot different is the checking
applied at function creation time ;-).
For a SQL function, by default we'll try to parse and analyze the body, so
any unknown tables will draw an error. plpgsql doesn't go further than a
very crude syntax check.
If you don't like that, you can set check_function_bodies = off while
creating your SQL functions. But in any case, it's only related to what
happens at execution if the search path is the same.
regards, tom lane
В списке pgsql-general по дате отправления: