pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: Mark <jxustnc@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re: How to execute the sql file in PSQL
Date: Tue, 6 Oct 2020 11:53:00 +0200
Message-ID: <EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com> (raw)
In-Reply-To: <CALChJr7La+9bFEy5mXtd_SyOKzu762Hsukph0D9zMF6ssz8Rgw@mail.gmail.com>
References: <CALChJr7S1M4W6QNcA4nOD55qyO1gjoG3T2PZGB_75mBM0tuknA@mail.gmail.com>
	<a48811ee-6332-2fe6-3a20-be4ce70b8bb2@aklaver.com>
	<1732342.1601913668@sss.pgh.pa.us>
	<CALChJr7La+9bFEy5mXtd_SyOKzu762Hsukph0D9zMF6ssz8Rgw@mail.gmail.com>

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 whole C:\...sql line one single word which is then passed to \i.

Cheers,
Paul




view thread (5+ messages)

Message-ID: <EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com>
Permalink:  ../EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com/
Also on:    postgresql.org/message-id/EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com, jxustnc@gmail.com, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com
  Subject: Re: How to execute the sql file in PSQL
  In-Reply-To: <EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com>
  References: <CALChJr7S1M4W6QNcA4nOD55qyO1gjoG3T2PZGB_75mBM0tuknA@mail.gmail.com> <a48811ee-6332-2fe6-3a20-be4ce70b8bb2@aklaver.com> <1732342.1601913668@sss.pgh.pa.us> <CALChJr7La+9bFEy5mXtd_SyOKzu762Hsukph0D9zMF6ssz8Rgw@mail.gmail.com> <EC0B814D-C38C-4BB5-B9A3-BC22DC68DAC1@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox