Azure Data Studio and VS Code Power Up PostgreSQL
With the March update of Azure Data Studio, Microsoft added preview support of the popular PostgreSQL database, along with a new PostgreSQL extension for the Visual Studio Code editor.
The push for PostgreSQL comes as the open source relational database sits at No. 4 in the DB-Engines Ranking and came in at No. 3 in the popularity ranking of the huge Stack Overflow developer survey last year.
Perhaps recognizing a steep upward trend in popularity over the past five years, Microsoft yesterday announced a preview PostgreSQL extension for Azure Data Studio, which was formerly known as SQL Operations Studio and is described as " a cross-platform modern editor focused on data development." At the same time, a similar extension was provided for VS Code, which has technological underpinnings similar to Azure Data Studio.
VS Code, of course, is the wildly popular open source, cross-platform code editor that more closely resembles a full-blown IDE through the use of hundreds of extensions. Azure Data Studio is also cross platform -- working on Windows, macOS and Linux -- and is primarily used to manage data parked in SQL Server, Azure SQL DB and SQL DW.
Microsoft said the two new extensions serve two camps in the data-development field: those primarily wrangling data and those primarily slinging code.
"Both Azure Data Studio and VS Code are open source and extensible - two things that PostgreSQL itself is based on," said Rachel Agyemang, program manager, Microsoft Azure, in a blog post yesterday.
"Azure Data Studio inherits a lot of VS Code functionality. It also supports most of VS Code's extensions like Python, R and Kubernetes support," she continued. "If your primary use case is data, choose Azure Data Studio. You can manage multiple database connections, explore database object hierarchy, set up dashboards, and more.
"On the other hand, if you're closer to application development than you are to database administration, then go for our PostgreSQL extension in VS Code. Actually, you don't have to choose -- use both, switching according to what works best for you at the time."
Agyemang said the new extension provides a GUI-based editor for working with PostgreSQL in addition to the database's existing and powerful command-line tool, psql. "It's pretty powerful," she said, "but some people much prefer a graphical editor. Even if you typically use command line, you may want to go visual sometimes."
According to the March release notes for Azure Data Studio and corresponding documentation, the new PostgreSQL extension includes the following features:
- Object Explorer
- Connection manager and query editor
- Customizable dashboards and insight widgets
- Code snippets
- Data editing
- Integrated terminal
- Keyboard shortcuts
- Source control integration
- Workspace and user settings
According to the GitHub page for the PostgreSQL for Visual Studio Code extension (available in the marketplace here), it provides functionality for developing PostgreSQL projects such as:
- Connect to PostgreSQL instances
- Manage connection profiles
- Connect to a different Postgres instance or database in each tab
- View object DDL with "Go to Definition" and "Peek Definition"
- Write queries with IntelliSense
- Run queries and save results as JSON, csv or Excel
As detailed fully in the release notes, Azure Data Studio also received other new features in the March update, including: SQL Notebooks functionality improvements; the addition of the VS Code PowerShell experience to the data studio; several extension updates (including SQL Server 2019 Preview); and several other tweaks and bug fixes.
About the Author
David Ramel is an editor and writer for Converge360.