Re: How to execute the sql file in PSQL - Mailing list pgsql-general

From Paul Förster
Subject Re: How to execute the sql file in PSQL
Date
Msg-id EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com
Whole thread Raw
In response to Re: How to execute the sql file in PSQL  (Mark <jxustnc@gmail.com>)
List pgsql-general
Hi Mark,

> On 06. Oct, 2020, at 10:23, Mark <jxustnc@gmail.com> wrote:
>
> Actually, a single quotation will work.
>  \ir  'C:\\Program Files\\PostgreSQL\\12\\demo-big-en-20170815.sql'
> But I don't know why a single quotation will work.
> It would be very helpful if you guys can explain to me.

because Microsoft had the glorious idea of putting a blank character into "Program Files". Quoting this will make the
wholeC:\...sql line one single word which is then passed to \i. 

Cheers,
Paul


pgsql-general by date:

Previous
From: Jayaram
Date:
Subject: RE: Handling time series data with PostgreSQL
Next
From: Alban Hertroys
Date:
Subject: Re: How to update a table with the result of deleting rows in another table