Skip to content

fix(indexes): fields vector to array #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/sql/indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ SELECT
idx.indisready AS is_ready,
idx.indislive AS is_live,
idx.indisreplident AS is_replica_identity,
idx.indkey AS key_attributes,
idx.indcollation AS collation,
idx.indclass AS class,
idx.indoption AS options,
idx.indkey::smallint[] AS key_attributes,
idx.indcollation::integer[] AS collation,
idx.indclass::integer[] AS class,
idx.indoption::smallint[] AS options,
idx.indpred AS index_predicate,
obj_description(idx.indexrelid, 'pg_class') AS comment,
ix.indexdef as index_definition,
Expand Down
32 changes: 24 additions & 8 deletions test/server/indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ test('list indexes', async () => {
{
"access_method": "btree",
"check_xmin": false,
"class": "3124",
"collation": "0",
"class": [
3124,
],
"collation": [
0,
],
"comment": null,
"id": 16399,
"index_attributes": [
Expand All @@ -37,10 +41,14 @@ test('list indexes', async () => {
"is_replica_identity": false,
"is_unique": true,
"is_valid": true,
"key_attributes": "1",
"key_attributes": [
1,
],
"number_of_attributes": 1,
"number_of_key_attributes": 1,
"options": "0",
"options": [
0,
],
"schema": "public",
"table_id": 16393,
}
Expand All @@ -56,8 +64,12 @@ test('retrieve index', async () => {
{
"access_method": "btree",
"check_xmin": false,
"class": "3124",
"collation": "0",
"class": [
3124,
],
"collation": [
0,
],
"comment": null,
"id": 16399,
"index_attributes": [
Expand All @@ -78,10 +90,14 @@ test('retrieve index', async () => {
"is_replica_identity": false,
"is_unique": true,
"is_valid": true,
"key_attributes": "1",
"key_attributes": [
1,
],
"number_of_attributes": 1,
"number_of_key_attributes": 1,
"options": "0",
"options": [
0,
],
"schema": "public",
"table_id": 16393,
}
Expand Down