Reputation: 14926
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
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
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