From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: SQL equivalint of #incude directive ? |
Date: | 2019-08-30 14:52:04 |
Message-ID: | 963ecca0-9449-e5e4-c3db-12d933a553ec@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Niels Jespersen | 2019-08-30 15:06:22 | Re: SSPI auth and mixed case usernames |
Previous Message | Justin Pryzby | 2019-08-30 14:26:55 | Re: postgres=# VACUUM FULL pg_statistic => ERROR: missing chunk number 0 for toast value .. in pg_toast_2619 |