Skip to content

sql: support ordering by JSON (pq: unable to encode table key: *tree.DJSON) #35706

@knz

Description

@knz

Currently it's not possible to order a table by a JSON column or create a primary index on a JSON column.

This is because JSON does not have a valid lexicographic ordering.
This is incidentally the issue underlying #24436 and #35260.

for reference, PostgreSQL supports it.

See also #35730

Epic: CRDB-24501
Jira issue: CRDB-4564

Metadata

Metadata

Assignees

Labels

A-sql-optimizerSQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamX-anchored-telemetryThe issue number is anchored by telemetry references.docs-donedocs-known-limitation

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions