Guerrilla
Guerrilla

Reputation: 14926

PostgreSQL syntax highlighting in Visual Studio 2017

When I create a .sql file in Visual Studio 2017 the syntax highlighting assumes I am using MSSQL and highlights valid PostgreSQL queries as having errors.

Is there any way to get Visual Studio 2017 to have proper syntax highlighting in .sql files for PostgreSQL?

Upvotes: 8

Views: 2075

Answers (2)

idchlife
idchlife

Reputation: 678

You can use this extension:https://marketplace.visualstudio.com/items?itemName=PabloLeon.PostgreSqlGrammar&ssr=false#overview

With .psql extension it highlights everything ok. No syntax checks though

Upvotes: 0

rfkortekaas
rfkortekaas

Reputation: 6504

If you are using a PostgreSQL plug-in, you need to rename your file to either ‘psql’ or ‘pgsql’ to enable to correct syntax highlighting.

Upvotes: 1

Related Questions