Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
От | Pavel Stehule |
---|---|
Тема | Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION } |
Дата | |
Msg-id | CAFj8pRBZzsjmL2FctUz7euA67etq-svuxiCmOTpNSqZ3SgX=rA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION } (Maciek Sakrejda <m.sakrejda@gmail.com>) |
Список | pgsql-hackers |
Hi
st 20. 9. 2023 v 9:34 odesílatel Maciek Sakrejda <m.sakrejda@gmail.com> napsal:
On Tue, Sep 19, 2023 at 5:56 PM Jeff Davis <pgsql@j-davis.com> wrote:
>...
> On Tue, 2023-09-19 at 11:41 -0400, Robert Haas wrote:
> > That leads to a second idea, which is having it continue
> > to be a GUC but only affect directly-entered SQL, with all
> > indirectly-entered SQL either being stored as a node tree or having a
> > search_path property attached somewhere.
>
> That's not too far from the proposed patch and I'd certainly be
> interested to hear more and/or adapt my patch towards this idea.
As an interested bystander, that's the same thing I was thinking when
reading this. I reread your original e-mail, Jeff, and I still think
that.
I wonder if something like CURRENT (i.e., the search path at function
creation time) might be a useful keyword addition. I can see some uses
(more forgiving than SYSTEM but not as loose as SESSION), but I don't
know if it would justify its presence.
Personally, I dislike this - because the value of the search path is hidden in this case.
I agree so it can be comfortable, but it can be confusing for review, migration, ...
Regards
Pavel
Thanks for working on this.
Thanks,
Maciek
В списке pgsql-hackers по дате отправления: