Re: SQL equivalint of #incude directive ?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: SQL equivalint of #incude directive ?
Дата
Msg-id 963ecca0-9449-e5e4-c3db-12d933a553ec@gmx.net
обсуждение исходный текст
Ответ на SQL equivalint of #incude directive ?  (stan <stanb@panix.com>)
Список pgsql-general
stan schrieb am 30.08.2019 um 15:48:
> I thought this would be common. But a quick Google only revealed what look to be
> workarounds.
>
> I am defining a bunch of functions, and I would prefer to store them in a
> separate file, which then gets "source" by the main DB init file.
>
> Is there a standard way to do this?


Define "standard".

With psql you can use the \i directive from within a SQL script.

But that does not work with other SQL clients.

It all depends on the SQL client you use to run those scripts.

I use Liquibase to manage schema setup and migration - that has a totally different "include" directive then psql.






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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunknumber 0 for toast value .. in pg_toast_2619
Следующее
От: Rich Shepard
Дата:
Сообщение: Escape parentheses in aggregate function