Skip to content

Opening USE [master] line not understood #154

Description

@maresb

The first two lines of my MS SQL script are

USE [master]
GO

I'm encountering the following bug:

$ sqlserver2pgsql/sqlserver2pgsql.pl -f db.schema.sql -b output_before_script -a output_after_script -u output_unsure_script

Wide character in die at sqlserver2pgsql/sqlserver2pgsql.pl line 2470, <$file> line 1.
Line <USE [master]
> (1) not understood. This is a bug at sqlserver2pgsql/sqlserver2pgsql.pl line 2470, <$file> line 1.

The error occurs on this line and from what I can tell, the parentheses in this line seem to be preventing the match.

My perl is unfortunately fairly rusty, so I'm not sure how to fix this, or even why I'm getting this error in the first place.

More info:

$ file db.schema.sql && uname -a && perl --version
db.schema.sql: UTF-8 Unicode (with BOM) text, with very long lines
Linux 6a37df95ea7c 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 50 registered patches, see perl -V for more detail)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions