Is there a bug in psql? (SELECT ''';)

From: Wen Yi <896634148(at)qq(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Is there a bug in psql? (SELECT ''';)
Date: 2023-05-31 07:17:14
Message-ID: tencent_27D6CDAD1699DE403EC409B96949CBB8CC0A@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;
postgres'# exit
Use control-D to quit.
postgres'# \q
Use control-D to quit.
postgres'#
\q
bash-5.1$

And I do another test

postgres=# SELECT ''';
postgres'# exit
Use control-D to quit.
postgres'# \q
Use control-D to quit.
postgres'#
\q
bash-5.1$

Is there a bug in psql?

Yours,
Wen Yi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Lechner 2023-05-31 07:23:46 AW: Is there a bug in psql? (SELECT ''';)
Previous Message Lian Jiang 2023-05-31 05:52:16 Re: speed up full table scan using psql