You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
24778: sql: fix qualified index name resolution r=knz a=knz
Fixes#24475.
cc @nvanbenschoten
In CockroachDB index names are relative to a table name
(e.g. `tbl@idx`) but in Postgres index names live in the schema
namespace. To offer compatibility with Postgres, CockroachDB
implements a special name resolution algorithm for index names
specified without the '@' syntax. For example, `DROP INDEX foo` will
search all tables in the current schema to find one with index name
`foo`.
Prior to this patch, CockroachDB was not able to search for a
_qualified_ index name specified without the '@' syntax. For example,
TypeORM issues `DROP INDEX public."primary"`, expecting to be able to
drop the primary index of some table in the `public` schema. This was
not recognized by CockroachDB.
This patch extends the name resolution for index names to support both
partial and complete qualification, using the same name resolution
rules as other objects.
Release note (sql change): CockroachDB now supports more ways to
specify an index name for statements that require one (e.g., `DROP
INDEX`, `ALTER INDEX ... RENAME`, etc.), in a way more compatible with
PostgreSQL.
Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
The following statement fails to execute. This is likely fallout from #22753.
Found when revisiting #22298.
The text was updated successfully, but these errors were encountered: