pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: takaram71@gmail.com
Subject: BUG #17767: psql: tab-completion causes warnings when standard_conforming_strings = off
Date: Wed, 01 Feb 2023 09:45:39 +0000
Message-ID: <17767-e5c80c3e56ded85c@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17767
Logged by:          Takuya Aramaki
Email address:      takaram71@gmail.com
PostgreSQL version: 15.1
Operating system:   Debian bullseye
Description:        

Hello,

I unexpectedly got some warning messages when using tab-completion of
psql.
I only face this issue with psql 15, not with v14.

Step to reproduce:
1. Set standard_conforming_strings = off
2. Type `\d _` and press Tab key

Actual result:
Got `WARNING:  nonstandard use of \\ in a string literal`

Expected result:
No warning messages

Below is my console log when I reproduced this issue with the official
docker image.

~~~
$ docker run --rm --name postgres -e POSTGRES_PASSWORD=pass -d
postgres:15.1
67361a066d40c8f98af6e21028839a2b6a9852dceaaf3d01c3e8c06ffae91d2e
$ docker exec -it postgres psql -h localhost -U postgres
psql (15.1 (Debian 15.1-1.pgdg110+1))
Type "help" for help.

postgres=# SET standard_conforming_strings = off;
SET
postgres=# \d _WARNING:  nonstandard use of \\ in a string literal
LINE 1: ...FROM pg_catalog.pg_class c WHERE (c.relname) LIKE '\\_%' AND...
                                                             ^
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
WARNING:  nonstandard use of \\ in a string literal
LINE 3: ...OM pg_catalog.pg_namespace n WHERE n.nspname LIKE '\\_%' AND...
                                                             ^
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
~~~

Thank you.



view thread (11+ messages)  latest in thread

Message-ID: <17767-e5c80c3e56ded85c@postgresql.org>
Permalink:  ../17767-e5c80c3e56ded85c@postgresql.org/
Also on:    postgresql.org/message-id/17767-e5c80c3e56ded85c@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, takaram71@gmail.com
  Subject: Re: BUG #17767: psql: tab-completion causes warnings when standard_conforming_strings = off
  In-Reply-To: <17767-e5c80c3e56ded85c@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox