Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
Hi Daniel, "-P pager=off" works I think you found the root cause. Thanks for your help. Arden On Sun, Apr 5, 2020 at 2:32 PM Daniel Verite wrote: > Adrian Klaver wrote: > > > On 4/5/20 9:46 AM, Adrian Klaver wrote: > > > On 4/5/20 5:50 AM, arden liu wrote: > > > > > 4) I don't see a

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Daniel Verite
Adrian Klaver wrote: > On 4/5/20 9:46 AM, Adrian Klaver wrote: > > On 4/5/20 5:50 AM, arden liu wrote: > > > 4) I don't see anything wrong the statements, so I am wondering if it is > > a shell issue? > > Seems to be. I removed the RETURNING *_id from the INSERT statements and > the fi

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
Hi Adrian, I also consider it's related to Shell . Because when I run it from Java , I don't have this input request. Let me check some configuration of bash and try again. Thanks a lot. Arden On Sun., Apr. 5, 2020, 2:09 p.m. Adrian Klaver, wrote: > On 4/5/20 10:51 AM, arden liu wrote: > > Do

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Adrian Klaver
On 4/5/20 10:51 AM, arden liu wrote: Does that RETURNING need any user input? No. I just think actually returning those thousands of values is stalling the shell. It also not really necessary for the loading as 'INSERT 0 4333' shows you what you need to know. Unless you have super vision and

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
Does that RETURNING need any user input? On Sun., Apr. 5, 2020, 1:10 p.m. Adrian Klaver, wrote: > On 4/5/20 9:46 AM, Adrian Klaver wrote: > > On 4/5/20 5:50 AM, arden liu wrote: > > > 4) I don't see anything wrong the statements, so I am wondering if it is > > a shell issue? > > Seems to be. I r

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
Hi Adrian, When I use the following java to run the same command, which does not ask me any input. Maybe bash and java launch another process differently. - String command = "/usr/bin/psql postgresql://" +userName + ":" + password +"@"+ host + ":" + port + "/xbr

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
When I run any smaller SQL, psql does not ask any keyboard Input. I don't know what causes this input On Sun., Apr. 5, 2020, 12:46 p.m. Adrian Klaver, wrote: > 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/

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Adrian Klaver
On 4/5/20 9:46 AM, Adrian Klaver wrote: On 4/5/20 5:50 AM, arden liu wrote: 4) I don't see anything wrong the statements, so I am wondering if it is a shell issue? Seems to be. I removed the RETURNING *_id from the INSERT statements and the file ran without interruption: ... CREATE TABLE

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Adrian Klaver
On 4/5/20 9:46 AM, Adrian Klaver wrote: 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.ddl) here is my command: /usr/bin/psql postgresql://db_user:dbpassword@localhost:5

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Adrian Klaver
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.ddl) here is my command: /usr/bin/psql postgresql://db_user:dbpassword@localhost:5432/my_db -f /tmp/xbrlPublicPostgresDB.ddl

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Adrian Klaver
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.ddl) here is my command: /usr/bin/psql postgresql://db_user:dbpassword@localhost:5432/my_db -f /tmp/xbrlPublicPostgresDB.ddl

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread David G. Johnston
On Sun, Apr 5, 2020 at 7:47 AM Tim Clarke wrote: > Your first argument is a JDBC connection string (see here > https://jdbc.postgresql.org/documentation/80/connect.html). To provide > the details when using the command line psql command, use the -h, -p and > -U parameters (https://www.postgresql.

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Tim Clarke
Arden Your first argument is a JDBC connection string (see here https://jdbc.postgresql.org/documentation/80/connect.html). To provide the details when using the command line psql command, use the -h, -p and -U parameters (https://www.postgresql.org/docs/12/app-psql.html) Tim Clarke IT Director

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread Rob Sargent
> On Apr 5, 2020, at 8:24 AM, David G. Johnston > wrote: > >  >> On Sun, Apr 5, 2020 at 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.ddl) >> here is my command: >> /usr/b

Re: psql show me the : and ask user input, when running one sql file

2020-04-05 Thread David G. Johnston
On Sun, Apr 5, 2020 at 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.ddl > ) > here is my command: > /usr/bin/psql postgresql://db_user:dbpassword@localhost:5432/my_db -f > /tmp/

psql show me the : and ask user input, when running one sql file

2020-04-05 Thread arden liu
I am using psql to run this sql file( https://github.com/Arelle/Arelle/blob/master/arelle/plugin/xbrlDB/sql/public/xbrlPublicPostgresDB.ddl ) 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 : ,