You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a temporal table the GENERATED ALWAYS AS ROW END statement triggers the collapsible region prematurely.
The following collapses the whole table leaving just the CREATE TABLE line as expected:
CREATE TABLE [dbo].[Person] (
[PersonId]
INT
IDENTITY(1, 1)
NOT NULL,
[Name]
NVARCHAR(400)
NOT NULL,
[BornOn]
DATETIMEOFFSET
NOT NULL
);
But the following collapses to the GENERATED ALWAYS AS ROW END leaving the rest of the table exposed:
CREATE TABLE [dbo].[Person] (
[ValidFrom]
DATETIME2
GENERATED ALWAYS AS ROW START
NOT NULL,
[ValidTo]
DATETIME2
GENERATED ALWAYS AS ROW END
NOT NULL,
[PersonId]
INT
IDENTITY(1, 1)
NOT NULL,
[Name]
NVARCHAR(400)
NOT NULL,
[BornOn]
DATETIMEOFFSET
NOT NULL,
PERIOD FOR SYSTEM_TIME ([ValidFrom], [ValidTo])
)
WITH (SYSTEM_VERSION = ON (HISTORY_TABLE = [dbo].[Person:History]));
Test Conditions:
OS: Windows 10
Notepad++: v6.9.2
Language: SQL
I suspect that for the SQL Language the END keyword is trigger to end the region but in this case the region wasn't started with BEGIN so END shouldn't have a corresponding opening region trigger.
I hope i have provided enough information and you also consider this a bug.
The text was updated successfully, but these errors were encountered:
You use SQL lexer which is not intended for SQL2016, should be used MSSQL lexer, unfortunately it is currently not exposed in Notepad ++ (same as MySQL lexer). SQL lexer is for standard SQL and Oracle. It would be nice to expose some existing (and popular) lexers.
When defining a temporal table the
GENERATED ALWAYS AS ROW END
statement triggers the collapsible region prematurely.The following collapses the whole table leaving just the
CREATE TABLE
line as expected:But the following collapses to the
GENERATED ALWAYS AS ROW END
leaving the rest of the table exposed:Test Conditions:
I suspect that for the SQL Language the
END
keyword is trigger to end the region but in this case the region wasn't started withBEGIN
soEND
shouldn't have a corresponding opening region trigger.I hope i have provided enough information and you also consider this a bug.
The text was updated successfully, but these errors were encountered: