Re: Scripting with subdirectories - how to specify script locations.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie>
Cc: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Scripting with subdirectories - how to specify script locations.
Date: 2021-06-02 13:33:32
Message-ID: CAKFQuwaG2o9zvHfMk5nZ-eDBo739J8DFSU=Yqzns_NV23KExFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wednesday, June 2, 2021, Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie> wrote:

>
> ├── tab_create
> │ ├── 01_create_tables.sql
> │ ├── create.hr.employees.sql
> │ └── create.production.suppliers.sql
>
> ===========================
> \i ./create.hr.employees.sql;
>
> \i ./create.production.suppliers.sql;
> ==============================
>
> I know I'm probably missing something basic - could some kind soul
> point me in the right direction?
>

\ir is “include relative”, makes the cwd the directory of the active script
instead lf where psql was run from.

David J.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Pól Ua Laoínecháin 2021-06-02 15:18:40 Re: Scripting with subdirectories - how to specify script locations.
Previous Message Pól Ua Laoínecháin 2021-06-02 11:48:56 Scripting with subdirectories - how to specify script locations.