From: Adrian Klaver <adrian.klaver@aklaver.com>
To: arden liu <ardenbook@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: psql show me the : and ask user input, when running one sql file
Date: Sun, 5 Apr 2020 09:46:06 -0700
Message-ID: <86019357-d505-846a-40e4-76e90926e029@aklaver.com> (raw)
In-Reply-To: <CAK0Kdkmw2buewJ1cW02XJM+D2mWz_vd+5k7xZ4ctPkjbFSdiwA@mail.gmail.com>
References: <CAK0Kdkmw2buewJ1cW02XJM+D2mWz_vd+5k7xZ4ctPkjbFSdiwA@mail.gmail.com>
On 4/5/20 5:50 AM, arden liu wrote:
> I am using psql to run this sql
> file(https://github.com/Arelle/Arelle/blob/master/arelle/plugin/xbrlDB/sql/public/xbrlPublicPostgresDB.dd...)
> here is my command:
> /usr/bin/psql postgresql://db_user:dbpassword@localhost:5432/my_db -f
> /tmp/xbrlPublicPostgresDB.ddl
> I do not know why it show me the : , which is asking me to input something.
> Can someone help me?
Well I ran the file(basically a modified dump file) and what I found is it:
1) Hung on:
INSERT INTO industry (industry_id, industry_classification,
industry_code, industry_description, depth, parent_id) VALUES
...
RETURNING industry_id;
INSERT 0 4333
and
INSERT INTO industry_level (industry_level_id, industry_classification,
ancestor_id, ancestor_code, ancestor_depth, descendant_id,
descendant_code, descendant_depth) VALUES
...
RETURNING industry_level_id;
INSERT 0 9326
2) It did not hang on:
INSERT INTO industry_structure (industry_structure_id,
industry_classification, depth, level_name) VALUES
...
RETURNING industry_structure_id;
INSERT 0 13
3) For the hung cases all the INSERTS completed, I just needed to hit
any key to get the next INSERT statement to kick off.
4) I don't see anything wrong the statements, so I am wondering if it is
a shell issue?
> Thanks.
> Arden
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, ardenbook@gmail.com
Subject: Re: psql show me the : and ask user input, when running one sql file
In-Reply-To: <86019357-d505-846a-40e4-76e90926e029@aklaver.com>
References: <CAK0Kdkmw2buewJ1cW02XJM+D2mWz_vd+5k7xZ4ctPkjbFSdiwA@mail.gmail.com> <86019357-d505-846a-40e4-76e90926e029@aklaver.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