Re: How to watch for schema changes

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to watch for schema changes
Дата
Msg-id CAKFQuwZXb6AmYv17d4xZk=7w+9py6XG3X+vXo-yG-JpWkg8XNw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to watch for schema changes  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-general
On Thu, Jul 5, 2018 at 10:07 AM, Igor Korot <ikorot01@gmail.com> wrote:
On Thu, Jul 5, 2018 at 11:49 AM, David G. Johnston
<david.g.johnston@gmail.com> wrote:

> You can, and depending on how often you intend to execute said code, it is
> probably the better way.  It also requires pl/pgsql while CREATE OR REPLACE
> "just works" as a single SQL command.  It seems easier to give you the
> simple answer than to work out the details for the more complex one.

Is it the same from the DB server POV? Meaning it is also the same 1/2
hit depending on the existence? Also performance-wise querying and this
method is the same, right?

If you care about performance here I'd suggest you measure it.  The absence of catalog bloat is the more meaningful benefit IMO.

If the function doesn't exist CREATE FUNCTION likely wins hands-down.  If the function name/signature does exist you are starting to compare apples and oranges.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Split daterange into sub periods
Следующее
От: Rafal Pietrak
Дата:
Сообщение: Re: FK v.s unique indexes