Thread: psql does not provide proper response

psql does not provide proper response

From
Shaozhong SHI
Date:
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

Re: psql does not provide proper response

From
Rob Sargent
Date:
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?

Re: psql does not provide proper response

From
Bryn Llewellyn
Date:
> 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
forgotto 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
whatyou did: a big fat nothing. 

Might this be happening to you?




Re: psql does not provide proper response

From
Pavel Stehule
Date:


č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
 

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?



Re: psql does not provide proper response

From
"David G. Johnston"
Date:
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.

Re: psql does not provide proper response

From
Shaozhong SHI
Date:
Added.  But only head of columns appeared.
Any way to visualise?
Regards, David

On Thursday, 20 January 2022, Rob Sargent <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?

Re: psql does not provide proper response

From
"David G. Johnston"
Date:
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.

Re: psql does not provide proper response

From
Adrian Klaver
Date:
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