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.