Re: [GENERAL] Shared Constants in PLPGSQL
От
Merlin Moncure
Тема
Re: [GENERAL] Shared Constants in PLPGSQL
Дата
Msg-id
CAHyXU0yH10Wga6ebtNvsUotKbMRbUueAx5S856Jr7VahJs3QpA@mail.gmail.com
Ответ на
Re: [GENERAL] Shared Constants in PLPGSQL (Tim Uckun)
Список
Дерево обсуждения
[GENERAL] Shared Constants in PLPGSQL Tim Uckun <timuckun@gmail.com>
Re: [GENERAL] Shared Constants in PLPGSQL "btober@computer.org" <btober@broadstripe.net>
Re: [GENERAL] Shared Constants in PLPGSQL Merlin Moncure <mmoncure@gmail.com>
Re: [GENERAL] Shared Constants in PLPGSQL Tim Uckun <timuckun@gmail.com>
Re: [GENERAL] Shared Constants in PLPGSQL Merlin Moncure <mmoncure@gmail.com>
Re: [GENERAL] Shared Constants in PLPGSQL Merlin Moncure <mmoncure@gmail.com>
On Tue, Aug 1, 2017 at 8:29 AM, Tim Uckun wrote: > In my case I don't expect these constants to be changed on a regular basis. > They will be set just once and that's it. I was thinking it would be just as > easy to set them in a proc as it would be to set them in a table. By putting > them in an immutable proc I can hopefully save a couple of compute cycles. Sure. The point is, by having a proc return a table based composite type, you can simplify changes down the line. Adding a new setting can be done via ALTER. Changing a setting (should it become necessary) can be done with an UPDATE. The immutable wrapping function does eliminate some fetches and I would generally write that wrapper. merlin
В списке pgsql-general по дате отправления
От: Dan Cooperstock at Software4Nonprofits
Дата:
От: Jeff Janes
Дата: