Closed
Description
Describe the problem
This bug affects CockroachDB version v20.2.0-beta.*.
When querying information_schema.tables
for a specific table which resides in a custom schema (not in public
) the
string equality operator (=
) does not work as expected on the table_name
column. As a workaround one can use the
like
operator with a wildcard (%...%
) pattern which seems to work as expected.
To Reproduce
Spin up a CockroachDB cluster e.g. using docker run --rm -it -p 26257:26257 cockroachdb/cockroach:latest-v20.2 start-single-node --insecure
and apply the following SQL statements.
create schema nx;
create table nx.yy(a int);
select * from information_schema.tables where table_schema = 'nx' and table_name = 'yy';
--> unexpected empty result !!!
select * from information_schema.tables where table_name = 'yy';
--> unexpected empty result !!!
select * from information_schema.tables where table_schema = 'nx' and table_name like '%yy%' and length(table_name) = length('yy');
--> expected result with one row
Environment:
- CockroachDB version
v20.2.0-beta.*
Metadata
Metadata
Assignees
Labels
Virtual tables - pg_catalog, information_schema etcCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Originated from the communityblathers was able to find an ownerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.