psql does not provide proper response

Started by Shaozhong SHIabout 4 years ago8 messagesgeneral
Jump to latest
#1Shaozhong SHI
shishaozhong@gmail.com

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

Regards,

David

#2Rob Sargent
robjsargent@gmail.com
In reply to: Shaozhong SHI (#1)
Re: psql does not provide proper response

On 1/20/22 10:54, Shaozhong SHI wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

Regards,

David

Add semi-colon return?

#3Bryn Llewellyn
bryn@yugabyte.com
In reply to: Shaozhong SHI (#1)
Re: psql does not provide proper response

shishaozhong@gmail.com wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

This happens to me all too frequently. Then I kick myself and realize that I earlier said “\o spool.txt” (by hand) and forgot to turn it off with the bare “\o”. This is my typical use case:

\o spool.txt
\i script.sql

The script causes an error. I read it, see the bad statement, and then type the correct statement by hand. Then I see what you did: a big fat nothing.

Might this be happening to you?

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: Bryn Llewellyn (#3)
Re: psql does not provide proper response

čt 20. 1. 2022 v 19:50 odesílatel Bryn Llewellyn <bryn@yugabyte.com> napsal:

shishaozhong@gmail.com wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

you are missing to write semicolon - at end of command

you see it in prompt "-#"

Regards

Pavel

Show quoted text

This happens to me all too frequently. Then I kick myself and realize that
I earlier said “\o spool.txt” (by hand) and forgot to turn it off with the
bare “\o”. This is my typical use case:

\o spool.txt
\i script.sql

The script causes an error. I read it, see the bad statement, and then
type the correct statement by hand. Then I see what you did: a big fat
nothing.

Might this be happening to you?

#5David G. Johnston
david.g.johnston@gmail.com
In reply to: Shaozhong SHI (#1)
Re: psql does not provide proper response

On Thu, Jan 20, 2022 at 10:55 AM Shaozhong SHI <shishaozhong@gmail.com>
wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

You got and are showing the proper response, the prompt changed from
"user=#" to "user-#".

The reason it did that response instead of showing a query result has
already been answered.

David J.

#6Shaozhong SHI
shishaozhong@gmail.com
In reply to: Rob Sargent (#2)
Re: psql does not provide proper response

Added. But only head of columns appeared.
Any way to visualise?
Regards, David

On Thursday, 20 January 2022, Rob Sargent <robjsargent@gmail.com> wrote:

Show quoted text

On 1/20/22 10:54, Shaozhong SHI wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

Regards,

David

Add semi-colon return?

#7David G. Johnston
david.g.johnston@gmail.com
In reply to: Shaozhong SHI (#6)
Re: psql does not provide proper response

On Thu, Jan 20, 2022 at 1:35 PM Shaozhong SHI <shishaozhong@gmail.com>
wrote:

Added. But only head of columns appeared.

Then the table is probably empty...

Any way to visualise?

Visualize what? You do realize that psql is a text-based application,
right?

David J.

#8Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Shaozhong SHI (#6)
Re: psql does not provide proper response

On 1/20/22 12:35, Shaozhong SHI wrote:

Added.  But only head of columns appeared.

Best guess is there is no data in table.

Do:

select count(*) from boundaryline.scotland_and_wales_const_region;

Any way to visualise?
Regards, David

On Thursday, 20 January 2022, Rob Sargent <robjsargent@gmail.com
<mailto:robjsargent@gmail.com>> wrote:

On 1/20/22 10:54, Shaozhong SHI wrote:

I do not know what happened.

psql does not provide proper response anymore.

I typed the following and see nothing.

user=# select * from boundaryline.scotland_and_wales_const_region
user-#

Can anyone enlighten me?

Regards,

David

Add semi-colon return?

--
Adrian Klaver
adrian.klaver@aklaver.com