Skip to content

Conversation

mvzink
Copy link
Contributor

@mvzink mvzink commented Aug 5, 2025

The column list in CREATE INDEX now matches the style used elsewhere, e.g. in TableConstraint, which is to use spaces after commas.

-- before:
CREATE INDEX idx_name ON table_name (column1,column2,column3);
-- after:
CREATE INDEX idx_name ON table_name (column1, column2, column3);

When CreateIndex was added, there was no explanation for the lack of spaces, so I assume it was just author preference. But standard style in all documentation I've seen is to use spaces after commas (including MSSQL's documentation of INCLUDE, which copied the no-spaces style when added).

The column list in `CREATE INDEX` now matches the style used elsewhere,
e.g. in `TableConstraint`, which is to use spaces after commas.

```sql
-- before:
CREATE INDEX idx_name ON table_name (column1,column2,column3);
-- after:
CREATE INDEX idx_name ON table_name (column1, column2, column3);
```

When `CreateIndex` was added, there was no explanation for the lack of
spaces, so I assume it was just author preference. But standard style in
all documentation I've seen is to use spaces after commas (including
[MSSQL]'s documentation of `INCLUDE`, which copied the no-spaces style
when added).

[MSSQL]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-index-transact-sql?view=sql-server-ver17#i-create-an-index-with-included-non-key-columns
@mvzink
Copy link
Contributor Author

mvzink commented Aug 5, 2025

Actually, I'm making much more substantial changes to CREATE INDEX and this is kind of minor and not worth reviewing in isolation and holding up a different more important PR; so I'll close this one and open a new one shortly.

@mvzink mvzink closed this Aug 5, 2025
@mvzink mvzink deleted the push-zwsqnwrtrolr branch August 5, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant