Re: Is there a bug in psql? (SELECT ''';) - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Is there a bug in psql? (SELECT ''';)
Date
Msg-id ZHdI5hdmlRiYrpWC@depesz.com
Whole thread Raw
In response to Is there a bug in psql? (SELECT ''';)  ("Wen Yi" <896634148@qq.com>)
List pgsql-general
On Wed, May 31, 2023 at 03:17:14PM +0800, Wen Yi wrote:
> Hi team,
> when I learn the postgres, I try to store the ' into the database, 
> 
> but something unexpected happend.
> 
> 
> postgres=# CREATE TABLE test (str varchar);
> CREATE TABLE
> postgres=# INSERT INTO test values (''');
> postgres'# SELECT * FROM test;

In here, in prompt, you can see that it's waiting for you to end your
'-qutoed string.

You seem to expect
INSERT INTO test values (''');
to do something, which it won't as it's not full query.

What do you think this should be doing?

Best regards,

depesz




pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Pg 16: will pg_dump & pg_restore be faster?
Next
From: "peter.borissow@kartographia.com"
Date:
Subject: Hash Index on Partitioned Table