Creating a function if it's not there in Postgres

Поиск
Список
Период
Сортировка
Искать
От
Robert James
Тема
Creating a function if it's not there in Postgres
Дата
в 15:17:22
Msg-id
e09785e00705181117r6bec8bf7gcc93006196f8879c@mail.gmail.com
Список
Дерево обсуждения
Creating a function if it's not there in Postgres "Robert James" <srobertjames@gmail.com>
Re: Creating a function if it's not there in Postgres "Joshua D. Drake" <jd@commandprompt.com>
I use a set of DDL scripts to automatically create the database for an app.

I need to create certain functions (from contrib), if they're not there already.  If they are there, I don't want to DROP or REPLACE them, since they may be used in certain indexes and triggers.

Is there a way to only CREATE a function if it is not defined already?
Is there a simple way to see if the function is defined?

(I don't want to just try creating it and letting it fail, since the DDL runs in a transaction).

Thank you.

В списке pgsql-general по дате отправления
От: ABHANG RANE
Дата:
Сообщение: contirb install
От: Joshua D. Drake
Дата:
FAQ