Skip to content

Postgres doesn't support # style line comments #23

@doekman

Description

@doekman

Postgres doesn't support # style line comments, only -- style.

So I commented out the following within SQL.tmLanguage:

{	begin = '(^[ \t]+)?(?=#)';
	end = '(?!\G)';
	beginCaptures = { 1 = { name = 'punctuation.whitespace.comment.leading.sql'; }; };
	patterns = (
		{	name = 'comment.line.number-sign.sql';
			begin = '#';
			end = '\n';
			beginCaptures = { 0 = { name = 'punctuation.definition.comment.sql'; }; };
		},
	);
},

This is a small difference with MySQL I guess. Another difference: in Postgres "--test" is a comment, while in MySQL it is not. Two dashes need to be followed by a space or a control character.

This is a small issue, but I think it's worth looking at.

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