TablePlus-Windows icon indicating copy to clipboard operation
TablePlus-Windows copied to clipboard

Display of indexed columns in CockroachDB

Open ferdypruis opened this issue 2 years ago • 0 comments

  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0): PostgreSQL 14.0

  2. Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): Build 214 (Version 5.0.4 - x64)

  3. The steps to reproduce this issue: Create a table in a CockroachDB database using the following DDL;

CREATE TABLE sometable (
  id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
  name STRING,
  age INT,	
  INDEX sometable_name_idx (name) STORING (age)
);

STORING in CockroachDB is like INCLUDE in Postgresql

The output of SHOW INDEX FROM sometable shows;

index_name index_name non_unique seq_in_index column_name direction storing implicit
sometable sometable_name_idx t 1 name ASC f f
sometable sometable_name_idx t 2 age N/A t f
sometable sometable_name_idx t 3 id ASC f t

But when viewing the table structure, the following index details are displayed image

I expect the "column_name" column to show the indexed column "name" instead of "age".

ferdypruis avatar Jan 02 '23 14:01 ferdypruis