From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: a.kozhemyakin@postgrespro.ru
Subject: BUG #17570: Unrecognized node type for query with statistics on expressions
Date: Thu, 04 Aug 2022 08:27:06 +0000
Message-ID: <17570-f2f2e0f4bccf0965@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17570
Logged by: Alexander Kozhemyakin
Email address: a.kozhemyakin@postgrespro.ru
PostgreSQL version: 14.4
Operating system: ubunu 20.04
Description:
When executing the following script:
CREATE TABLE t(a INT, b VARCHAR);
INSERT INTO t(a, b) SELECT i, i FROM generate_series(1,100) s(i);
CREATE STATISTICS t_stats (mcv) ON (a), (b) FROM t;
ANALYZE t;
CREATE ROLE u;
--GRANT SELECT ON t TO u;
SET SESSION AUTHORIZATION u;
SELECT * FROM t WHERE a = 1 AND b::int = 1;
I get:
ERROR: unrecognized node type: 1697192808
And it fails with error "permission denied for table t" when condition is
just "a = 1" or "b::int = 1".
The same query executed successfully, if the select permission is granted to
user.
The first bad commit is a4d75c86b
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, a.kozhemyakin@postgrespro.ru
Subject: Re: BUG #17570: Unrecognized node type for query with statistics on expressions
In-Reply-To: <17570-f2f2e0f4bccf0965@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