sql: doesn't allow 'index' as a column name #69420
Labels
A-sql-pgcompat
Semantic compatibility with PostgreSQL
A-sql-syntax
Issues strictly related to the SQL grammar, with no semantic aspect
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-community
Originated from the community
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Describe the problem
Attempting to convert a PostgreSQL based application to CockroachDB. Found that CockroachDB is more strict than necessary in disallowing SQL keywords as column names. PostgreSQL works with a column named
index
while CockroachDB does not.Index
is a pretty common name for fields since it denotes an application generated identifier that differs from a DB identifier. Since it does not appear where the SQL keyword usually appears it should not be considered a syntax error.To Reproduce
cockroach demo
index
as a column name2
Expected behavior
Parity with PostgreSQL to allow
index
as a column name.Additional data / screenshots
Environment:
Additional context
Had to rename columns
Jira issue: CRDB-9589
The text was updated successfully, but these errors were encountered: