Skip to content

2.25.1.0-b326

@OlegLoginov OlegLoginov tagged this 10 Feb 13:22
Summary:
Before the fix `\d` command can output a error for any index with a space in the index name.
Example:
```
# create table "foo tbl" (i int primary key, j int);
CREATE TABLE
# create index "foo idx" on "foo tbl"(j);
CREATE INDEX
# \d "foo tbl"
ERROR:  invalid name syntax
LINE 2: FROM yb_table_properties('public.foo tbl_pkey'::regclass) pr...
                                 ^
ERROR:  invalid name syntax
```
After the fix the command works correctly:
```
# \d "foo tbl"
              Table "public.foo tbl"
 Column |  Type   | Collation | Nullable | Default
--------+---------+-----------+----------+---------
 i      | integer |           | not null |
 j      | integer |           |          |
Indexes:
    "foo tbl_pkey" PRIMARY KEY, lsm (i HASH)
    "foo idx" lsm (j HASH)
```

The main change: use `yb_table_properties(<index-oid>)` instead of
`yb_table_properties('<index-schema>.<index-name>'::regclass)`.

Test Plan: ./yb_build.sh --java-test  org.yb.pgsql.TestPgRegressIndex#schedule

Reviewers: mihnea, hsunder

Reviewed By: hsunder

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D41688
Assets 2
Loading