dalibo/sqlserver2pgsql

INCLUDE columns in indexes supported since postgresql 11

Closed this issue · 6 comments

"Warning: This index ($schemaname.$tablename.$idxname) has some include columns. This isn't supported in PostgreSQL.\n";

since postgresql version 11 this is supported.

I do have a couple in my migration but understand if this is low priority.
Probably a simple fix though

Hello @mikes-gh

Just to be sure about the SQL Server grammar, could you give me the original DDL to create the index with INCLUDE columns?

Cordialement,

This is what SSMS scripts out

CREATE NONCLUSTERED INDEX [IX_Transactions_TransDate] ON [dbo].[Transactions]
(
        [TransDate] ASC
)
INCLUDE ( [AccountNo],
[NetValue]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

Thank you for the script.

Here (#132) is a first version for parsing included columns. Does it work for you?

Branch #132 merged in master.

Several PR have been merged last week. Tell me if this is still fine for you.

All good as of 898044b
Ran a couple of imports since.

Great!
Thank you for the tests :-)

I'm closing this issue.