-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Hi Team,
If we have columns in square brackets in the source sql server schema as well as the dump, the columns in the view DDL gets parsed as is with the brackets which causes errors.
Source schema:
CREATE VIEW [Male_emp]
AS
SELECT
[Name], [Gender]
FROM Employee
WHERE Gender = 'Male';
go
Dump file using mssql-scripter:
/****** Object: View [dbo].[Male_emp] Script Date: 2/27/23 8:17:03 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE VIEW [dbo].[Male_emp]
AS
SELECT
[Name], [Gender]
FROM Employee
WHERE Gender = 'Male';
GO
Converted schema:
CREATE VIEW "public"."male_emp" AS
SELECT
[Name], [Gender]
FROM Employee
WHERE Gender = 'Male';
Corresponding error:
ERROR: syntax error at or near "["
LINE 3: [Name], [Gender]
^
Thanks a lot for your help.
Metadata
Metadata
Assignees
Labels
No labels