Visual Studio Configuration for PostgreSQL.sql Files

I am using VS2013 to edit .sql files intended for PostgreSQL. VS thinks they are for SQL Server, and spews all kinds of distracting errors and warnings, because the syntax is a little different.

What is the best way to configure VS to edit .sql files that are not intended for SQL Server at all or for PostgreSQL in particular?

(preferably without VS-plugins if there is no fantastic stable plugin.)

Is it possible to somehow disable certain bits of SQL Server? Should I link .sql files to regular text editor mode and completely ignore syntax highlighting?

+5
source share
2 answers

Go to Tools -> Options -> Text Editor / SQL Server Tools -> Intellisense and turn off Intellisense. This will make the warnings go away.

+2
source

I ran into the same problem. This is pretty annoying but easy to fix. In Visual Studio, click one of the problem sql files. In the properties field for this file, change the value of Create Action to None. Viola.

Note. You may then need to close the file for it to take effect.

+1
source

All Articles