Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6q5I-0004M3-SE for pgsql-general@arkaria.postgresql.org; Sat, 15 Aug 2020 06:54:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6q5H-0004M5-QY for pgsql-general@arkaria.postgresql.org; Sat, 15 Aug 2020 06:54:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6q5H-0004Ly-A2 for pgsql-general@lists.postgresql.org; Sat, 15 Aug 2020 06:54:31 +0000 Received: from mxout4.rambler.ru ([81.19.78.115]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6q5E-0002kn-ML for pgsql-general@postgresql.org; Sat, 15 Aug 2020 06:54:30 +0000 Received: from saddam1.rambler.ru (saddam1.rambler.ru [10.32.16.1]) by mxout4.rambler.ru (Postfix) with ESMTP id 60540140296; Sat, 15 Aug 2020 09:54:26 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rambler.ru; s=mail; t=1597474466; bh=knqCl83pdbW9OZEQC4mUxRA1oskc4qoBWsKAQ4E6ciA=; h=From:To:Cc:Reply-To:Subject:Date:In-Reply-To:References; b=HlzBxGy7W0lC3nXV2Xa0JnRQRtVviOk7+fTwrnjPxJ80XRHXCReYlom98oKvmHBY0 LyqhRhr86WIx9tV/1hphyOjRCBaFm0dS6Jr9Uz3xY6ezzskl662lpnSf9mPYf4eHC9 yrm/CyOMsKCRzAyW5gZSJ2X5Jps0sfup4c11lT8E= Received: from localhost.localdomain (localhost [127.0.0.1]) by saddam1.rambler.ru (Postfix) with ESMTP id 3C8E45A68F5; Sat, 15 Aug 2020 09:54:26 +0300 (MSK) Received: from [93.123.182.191] by mail.rambler.ru with HTTP; Sat, 15 Aug 2020 09:54:26 +0300 From: "Aleksey M Boltenkov" To: pavel.stehule@gmail.com Cc: "pgsql-general" Reply-To: "Aleksey M Boltenkov" Subject: RE: bug in psql? Date: Sat, 15 Aug 2020 09:54:26 +0300 Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_15974744663075537" In-Reply-To: Message-Id: <1597474466.158358.30755.58488@mail.rambler.ru> MIME-Version: 1.0 References: X-Mailer: Rambler WebMail, http://mail.rambler.ru/ X-Rambler-User: holybolt@rambler.ru/93.123.182.191 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --_----------=_15974744663075537 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; format="flowed" 15.08.2020, 09:49, Pavel Stehule so 15. 8. 2020 v 8:35 odes=C3=ADlatel Aleksey M Boltenkov napsal: eksey M Boltenkov. 15.08.2020, 08:39, Pavel Stehule so 15. 8. 2020 v 7:35 odes=C3=ADlatel Aleksey M Boltenkov napsal: Is this a bug? Executing of malformed (quote symbols) select in psql results in unexpected behaviour: pg01:5432 postgres@db=3D# select 'any expression'any expression\d+; List of relations Schema =E2=94=82 Name =E2=94=82 Type =E2=94=82 Owner =E2=94=82 Size= =E2=94=82 Description =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90 public =E2=94=82 geography_columns =E2=94=82 view =E2=94=82 postgre= s =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 geometry_columns =E2=94=82 view =E2=94=82 postgres= =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 pg_buffercache =E2=94=82 view =E2=94=82 postgres = =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 pg_stat_statements =E2=94=82 view =E2=94=82 postgr= es =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 raster_columns =E2=94=82 view =E2=94=82 postgres = =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 raster_overviews =E2=94=82 view =E2=94=82 postgres= =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 spatial_ref_sys =E2=94=82 table =E2=94=82 postgres= =E2=94=82 4616 kB =E2=94=82 ... I tested psql-12 and psql-14 and I don't see this issue Pavel Aleksey M Boltenkov. You must have relations in search path, ifaiu. engineer@pg02:~$ psql -U postgres -h localhost -p 5432 kaad SET Timing is on. Null display is "=C2=A4". Line style is unicode. Unicode border line style is "single". Unicode column line style is "single". Unicode header line style is "double". Output format is wrapped. SET Time: 0.234 ms SET Time: 0.206 ms psql (12.4 (Ubuntu 12.4-1.pgdg18.04+1)) Type "help" for help.2020-08-15 09:29:18 localhost:5432 postgres@kaad= =3D# select version(); version =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 PostgreSQL 12.4 (Ubuntu 12.4-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit (1 row)Time: 6.682 ms 2020-08-15 09:29:24 localhost:5432 postgres@kaad=3D# select 'any expression'any expression\d+; List of relations Schema =E2=94=82 Name =E2=94=82 Type =E2=94=82 Owner =E2=94=82 Size =E2= =94=82 Description =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 public =E2=94=82 geography_columns =E2=94=82 view =E2=94=82 postgres = =E2=94=82 0 bytes =E2=94=82 public =E2=94=82 geometry_columns =E2=94=82 view =E2=94=82 postgres =E2= =94=82 0 bytes =E2=94=82 public =E2=94=82 raster_columns =E2=94=82 view =E2=94=82 postgres =E2= =94=82 0 bytes =E2=94=82 public =E2=94=82 raster_overviews =E2=94=82 view =E2=94=82 postgres =E2= =94=82 0 bytes =E2=94=82 public =E2=94=82 spatial_ref_sys =E2=94=82 table =E2=94=82 postgres =E2= =94=82 4616 kB =E2=94=82 (5 rows)[more] - > ; -- semicolon is manually added ERROR: 42601: syntax error at or near "any" LINE 1: select 'any expression'any expression ^ LOCATION: scanner_yyerror, scan.l:1149 Time: 0.530 ms it is expected result from my perspective there is same error if you run your query without \d postgres=3D# select 'any expression 'any expression; ERROR: syntax error at or near "any" LINE 1: select 'any expression 'any expression; Aleksey M Boltenkov. Thank you, i just was impressed by execution of part of malformed select expression by psql as cli part. Aleksey M Boltenkov. --_----------=_15974744663075537 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"
15.08.2020, 09:49, Pavel Stehule <pave= l.stehule@gmail.com>


so 15. 8. 2020 v 8:35 odes=C3= =ADlatel Aleksey M Boltenkov <holybolt@rambler.ru> napsal:
eksey = M Boltenkov.

15.08.2020, 08:39, Pavel = Stehule <pavel.stehule@gmail.com>
<= div>


so 15. 8. 2020 = v 7:35 odes=C3=ADlatel Aleksey M Boltenkov <holybolt@rambler.ru> napsal:
<= /div>
Is this a bug?

Executing of malformed= (quote symbols) select in psql results in unexpected behaviour:
=
pg01:5432 postgres@db=3D# select 'any expression'any express= ion\d+;
List of relations
Schema =E2=94=82 Name =E2=94=82 Type =E2= =94=82 Owner =E2=94=82 Size =E2=94=82 Description
=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90
p= ublic =E2=94=82 geography_columns =E2=94=82 view =E2=94=82 postgres =E2=94= =82 0 bytes =E2=94=82
public =E2=94=82 geometry_columns =E2=94=82 view = =E2=94=82 postgres =E2=94=82 0 bytes =E2=94=82
public =E2=94=82 pg_buff= ercache =E2=94=82 view =E2=94=82 postgres =E2=94=82 0 bytes =E2=94=82
p= ublic =E2=94=82 pg_stat_statements =E2=94=82 view =E2=94=82 postgres =E2=94= =82 0 bytes =E2=94=82
public =E2=94=82 raster_columns =E2=94=82 view = =E2=94=82 postgres =E2=94=82 0 bytes =E2=94=82
public =E2=94=82 raster_= overviews =E2=94=82 view =E2=94=82 postgres =E2=94=82 0 bytes =E2=94=82
= public =E2=94=82 spatial_ref_sys =E2=94=82 table =E2=94=82 postgres =E2=94= =82 4616 kB =E2=94=82
...

I tested psql-12 and psql-14 and I don't see this issue

Pavel



Al= eksey M Boltenkov.


=

You must have relations in search path, ifaiu.

=
engineer@pg02:~$ psql -U postgres -h localhost -p 5432 kaad
SET
= Timing is on.
Null display is "=C2=A4".
Line style is unicode.
Uni= code border line style is "single".
Unicode column line style is "single= ".
Unicode header line style is "double".
Output format is wrapped.SET
Time: 0.234 ms
SET
Time: 0.206 ms
psql (12.4 (Ubuntu 12.4= -1.pgdg18.04+1))
Type "help" for help.
2020-08-15 09:29:18 loc= alhost:5432 postgres@kaad=3D# select version();
version
=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90
PostgreSQL 12.4 (Ubuntu 12.4-1.pgdg18.04+1) on= x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, = 64-bit
(1 row)
Time: 6.682 ms
2020-08-15 09:29:24 localhost= :5432 postgres@kaad=3D# select 'any expression'any expression\d+;
List = of relations
Schema =E2=94=82 Name =E2=94=82 Type =E2=94=82 Owner =E2= =94=82 Size =E2=94=82 Description
=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=AA=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90
public =E2=94=82 geography_columns =E2=94=82 view =E2=94=82 postgre= s =E2=94=82 0 bytes =E2=94=82
public =E2=94=82 geometry_columns =E2=94= =82 view =E2=94=82 postgres =E2=94=82 0 bytes =E2=94=82
public =E2=94= =82 raster_columns =E2=94=82 view =E2=94=82 postgres =E2=94=82 0 bytes =E2= =94=82
public =E2=94=82 raster_overviews =E2=94=82 view =E2=94=82 postg= res =E2=94=82 0 bytes =E2=94=82
public =E2=94=82 spatial_ref_sys =E2=94= =82 table =E2=94=82 postgres =E2=94=82 4616 kB =E2=94=82
(5 rows)
<= div>[more] - > ; -- semicolon is manually added
ERROR: 42601: syntax = error at or near "any"
LINE 1: select 'any expression'any expression
= ^
LOCATION: scanner_yyerror, scan.l:1149
Time: 0.530 ms

it = is expected result from my perspective

there is sa= me error if you run your query without \d

postgres= =3D# select 'any expression 'any expression;
ERROR:  syntax error a= t or near "any"
LINE 1: select 'any expression 'any expression;
 = ;            
 


Aleksey M Boltenkov.


Thank you, i just was impressed= by execution of part of malformed select expression by psql as cli part.

Aleksey M Boltenkov.

= --_----------=_15974744663075537--