
Azure Data Studio: An Open-Source GUI Editor for Postgres - craigkerstiens
https://azure.microsoft.com/en-us/blog/azure-data-studio-an-open-source-gui-editor-for-postgres/
======
garyclarke27
Wow, well done Microsoft, I am looking forward to trying this out. PgAdmin is
an embarrassment to the incredible Postgres community - it’s SQL editor is
virtually useless, so slow and buggy. Probably because PSQL is the favoured
option for most of the contributors, I’m not a huge fan of command line
editing, I much prefer tools like Sublime Text, so I use Sublime Text 3 for
SQL editing and it’s wonderful - blazing speed, rock solid, quite happy to
display a few million rows, such queries would have no chance in Pgadmin. Also
has a pg specific syntax highlighting plugin.

~~~
pjmlp
When the new version of PgAdmin came out, I kept using the previous native
version, much better than their UI reboot.

~~~
emptyfile
Pgadmin 4 is just an absolutely shocking piece of software.

~~~
phoe-krk
Shocking, as in? Could you elaborate?

~~~
pjmlp
They moved from an UI written in C++ to a Python process that launches a Web
based UI.

~~~
mrighele
I wouldn't mind a web based UI if it didn't mean less functionality, more
bugs, and a worse user experience.

------
lol768
For anyone else who's curious: yes, it's an Electron app (source at:
[https://github.com/Microsoft/azuredatastudio](https://github.com/Microsoft/azuredatastudio)).

Think I'll stick to DataGrip personally, though I'd be interested to see some
performance benchmarks to disprove my own comprehension of the quality of apps
built primarily in HTML/JS/Electron.

~~~
userbinator
...and yes, it phones home:

[https://docs.microsoft.com/en-us/sql/azure-data-
studio/usage...](https://docs.microsoft.com/en-us/sql/azure-data-studio/usage-
data-collection)

~~~
fxfan
God forbid they learn which features people use more and maybe improve them?

Surely you don't use gmail or any other webmail or a web service?

~~~
bitwize
The Daily Telegraph once put heat monitors under everyone's desk. There was an
outcry among the employees about this, and the explanation from the Telegraph
was it was part of their HVAC system, and allowed the air conditioner and
heater to smartly determine which parts of the building needed more heating
and cooling due to more human activity going on in those parts.

Under the most charitable interpretation of the above, the Telegraph meant
what it said, and only ever intended to use the data thus collected to
optimize HVAC output to only those areas with enough human activity to warrant
it.

But, you see, once they _had_ the data about who was at their desk and who
wasn't, it behooves them to _act_ on it.

~~~
fxfan
Except the privacy policy clearly states what Microsoft users this data for.
You can go around flailing your hands in constant paranoia or you can actually
give an evidence of wrongdoing and sue the shit out of them.

But why wait for evidence when posting "Micro$oft is evil" is more fun?

~~~
codetrotter
> But why wait for evidence when posting "Micro$oft is evil" is more fun?

But that’s not at all what they said. The argument they used applies to anyone
collecting data. Just like in the example they used.

And while you are right about the privacy policy stating what the data is used
for, what is there to prevent companies from changing their privacy policy at
any point in time? And if they change it, are they required to inform you that
the privacy policy has changed?

~~~
eitland
> And while you are right about the privacy policy stating what the data is
> used for, what is there to prevent companies from changing their privacy
> policy at any point in time? And if they change it, are they required to
> inform you that the privacy policy has changed?

For Europeans there is the GDPR.

This is also one of the things that AFAIK should be covered by the GDPR
(contrary to the cookie banners with opt out that I personally expect will get
their punishments soon.)

------
anewhnaccount2
From the license, this is "shared source" not OSI open source:
[https://github.com/Microsoft/azuredatastudio/blob/master/LIC...](https://github.com/Microsoft/azuredatastudio/blob/master/LICENSE.txt)

~~~
kevcunnane
The PostgreSQL extension is fully MIT licensed:
[https://github.com/Microsoft/azuredatastudio-
postgresql/blob...](https://github.com/Microsoft/azuredatastudio-
postgresql/blob/master/LICENSE) and
[https://github.com/Microsoft/pgtoolsservice/blob/master/Lice...](https://github.com/Microsoft/pgtoolsservice/blob/master/License.txt)
for the backing service.

------
jsmeaton
It looks like the VSCode extension version is missing the connection and
object explorer that the standalone app contains. That's unfortunate.

A few other issues:

Creating a connection from the command palette can not use a non-default port.
You'll need to edit the settings file by hand to change that.

Currently no support for SSH tunnels (unless you launch a tunnel yourself from
a terminal). I've opened a GitHub issue for that support.

When running a query it keeps asking me for a username for the connection,
even though the username is configured in the connection profile.

I currently use datagrip, but I'd much prefer to stay within the vscode
interface rather than switching between the two, as I'm much more familiar
with the vscode keyboard shortcuts and command palette. It's never really
obvious which connection a datagrip "console" is attached to.

~~~
nitinreddy88
I appreciate your efforts to put down missing functionality. Products evolve
over time, cant expect everything in first cut and compare it with product
which is staying for quite sometime

~~~
h1d
I don't really see how people are supposed to connect to databases without SSH
tunnel support. Are you supposed to be connecting to your development
localhost database or be inside corporate network where direct connection to
the database is allowed?

~~~
tatersolid
Most people use a VPN of some sort when connecting to remote databases

Our DB servers don’t have any ports listening on the internet, not even SSH.

TLS can be enforced for DB connections (both pg and mssql support this), but
that’s still prone to credential stuffing and the client _machine_ isn’t
usually authenticated. Lots of regulations generally require some extra
security layer protecting connections to the DB.

------
craigkerstiens
New to the Microsoft team I got an early look at this and was super excited.
Personally I'm biased towards psql [1], but admittedly there are many that
prefer a GUI interface [2] when working with their database. Postgres is a
great and powerful database, but as a community we're behind in this aspect.
While I don't think we need a million editors for a database that there isn't
a clear winner when it comes to Postgres makes this a welcome addition and I'm
excited to see how it helps make Postgres more approachable for others.

1\. [http://www.craigkerstiens.com/2013/02/13/How-I-Work-With-
Pos...](http://www.craigkerstiens.com/2013/02/13/How-I-Work-With-Postgres/)

2\. [https://www.softwareandbooz.com/postgresql-for-a-sql-
server-...](https://www.softwareandbooz.com/postgresql-for-a-sql-server-dba-a-
series/)

~~~
j88439h84
[https://github.com/dbcli/pgcli](https://github.com/dbcli/pgcli) is my
favorite terminal client for postgres. It has smart completion, syntax
highlighting, and more.

------
nindalf
Quick summary of the thread for those joining us

* This looks like a neat tool. Will check this out and compare it to DataGrip, Dbeaver etc.

* It's electron. This is terrible.

* There's analytics code in there. This is terrible.

~~~
switch007
Azure Data Studio also stores your credentials in plaintext if you tick
'Remember' (on Linux at least – it does not use the system keychains)

~~~
SamuelAdams
Please report an issue here:
[https://github.com/Microsoft/azuredatastudio/issues](https://github.com/Microsoft/azuredatastudio/issues)

~~~
switch007
There is one already — as a feature request to implement keychains.

------
radiKal07
This looks nice but as I expected it's built with Electron. I personally use
[https://tableplus.io/](https://tableplus.io/) . It's native and has great UI
and features.

~~~
sydd
For me DataGrip. How do these 2 compare to it?

~~~
philliphaydon
Table plus appears to me MAC only. A shame. But I’m happy with datagrip.

~~~
bbernoulli
It is on windows too:

[https://tableplus.io/windows](https://tableplus.io/windows)

~~~
philliphaydon
Oh cool. I couldn’t find that link on my phone and all I saw was OS X download
and screen shots so I assumed OS X only. I’ll give it a go tomorrow. Thanks.

------
mark_l_watson
I like that you can use it in its own app and also as a plugin for VSCode.

Microsoft really turned it around by supporting developers, IMO.

~~~
pjmlp
They never stopped supporting developers on Windows.

~~~
mark_l_watson
You are of course right. I was talking from my perspective. I don’t use
Windows but I think Office 365 is the best deal ever, and I appreciate general
tools like VSCode, keeping github on track and not changing things, etc.

------
fredley
I use Azure Data Studio for SQL Server already and it's fantastic. Super
lightweight, fast, and a really well-thought-through interface. It's honestly
the SQL administration app that I prefer out of all that I've used, free or
otherwise, and I'm very happy MS are taking it to more backends.

------
some-one-too
I've never seen on HN anyone ever mentioned "SQL Workbench/J": works across
many database systems, code completion, import/export, scripting, console
mode, the list just goes on and on...

www.sql-workbench.eu

~~~
mmsimanga
I am a big fan of SQL Workbench/J. I have mentioned it in a few threads[0][1]
on SQL tools but have also been surprised it isn't more popular.

[0][https://news.ycombinator.com/item?id=18934949](https://news.ycombinator.com/item?id=18934949)
[1][https://news.ycombinator.com/item?id=18934436](https://news.ycombinator.com/item?id=18934436)

------
yellowapple
I've been using ADS for a couple months now at work (since we've switched to a
new warehouse management system that uses SQL Server for its database) and
it's been pretty great as a cross-platform replacement for SSMS. The built-in
support for CSV and JSON dumps has been incredibly handy, too. It's both among
the few Electron (I think?) apps I like and among the few Microsoft products I
like.

Being able to use the same tool for Postgres would be awesome (we use both
Postgres and Redshift here, too); I've long felt that SQL Server's a god-awful
DB with awesome tooling while PostgreSQL's an awesome DB with god-awful
tooling, and now I'm looking forward to finally getting the best of both
worlds.

I wonder if it's possible to create extensions for arbitrary ODBC and/or JDBC
connections? If so, then that'd be yet another thing I could manipulate with
ADS (our ERP exposes its database via a presumably-proprietary DB protocol for
which they provide their own ODBC and JDBC connectors). It'd be awesome to
have a properly-good one-stop shop for all my SQL-finagling needs.

Now if only I could integrate all this with Emacs somehow...

EDIT: alas, it does not seem to want to install correctly on Slackware,
whether via ADS' extensions manager or by manually downloading/installing the
VSIX package. Seems to hang on "Starting pgsql service", and any attempt to
actually do anything throws a giant "Provider doesn't exist. id: PGSQL" error
(and attempting to run queries anyway just throws "Error: No Handler
Registered").

------
envoked
I’ve been using Postico
([https://eggerapps.at/postico](https://eggerapps.at/postico)) on OSX for the
last few years and been enjoying it: clean look, ability to edit and explore
schemas, ability to export results to a variety of formats (JSON, CSV, etc.),
and good cadence with releases.

The main thing it can’t do well is export/import large databases but that’s
what ‘pg_dump’ and friends are for.

------
bmaupin
The title was a bit misleading for me, giving me the impression that Azure
Data Studio is a new tool specifically for Postgres. The reality seems to be
that Azure Data Studio is an existing tool which already supports MS SQL
databases, and preview support for Postgres has been added. Which makes more
sense to me than Microsoft creating a new tool just for Postgres.

------
marcus_holmes
Looked really interesting. I'm working on a SQL-intensive project using
Postgres at the moment, and a better way of editing the numerous scripts would
be great.

Downloaded it, got it connected to my localhost Postgres server. Opened a
script file, nice syntax highlighting, yay :)

Syntax error at or near "drop". Oh dear. Ah well, back to Code and psql it
is...

------
symlinkk
Why does it have "Azure" in its name? Whoever is in charge of naming things at
Microsoft is doing a poor job.

~~~
michaelmarkell
For consistent branding around all tools and technologies that could feasibly
be used to build applications on top of Azure

~~~
PudgePacket
That's not a super strong argument.. Visual Studio -> Azure Code Studio,
TypeScript -> AzureScript, Windows -> Azuredows.. (Only a little tongue in
cheek )

------
sixhobbits
This looks really nice, but it's functionality is similar enough to Google
Data Studio (also connects to data sources) but different enough (an editor
instead of a dashboard) that it's going to cause confusion.

------
xfalcox
Really like it so far.

I was a heavy pgAdmin3 user at $lastjob and the fact that clicking some
elements would freeze it wasn't great. This looks to cache all details on
connection.

The data view doesn't really work with very long text fields, maybe allowing
users to edit those in a panel or modal could help UX.

Also, it doesn't really handles schemas, just prepend those to the table name,
instead of treating it like a "folder". Schemas have permissions so we need to
"see" those.

With the great hole that pgAdmin4 left, and with DataGrip being more on the
heavy side, I think this app can grab a good share of users.

Good work!

------
paulmendoza
My database server has 200+ databases and I had to stop using Datagrip because
it would freezea the time. Super excited to check this out.

~~~
philliphaydon
Turn off auto sync then. Sync only the portion of the tree you want synced.

------
drewda
I've recently been having good luck with this VS Code extension that adds a
Postgres tab for exploring schemas and running queries:
[https://marketplace.visualstudio.com/items?itemName=ckolkman...](https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-
postgres)

------
minhajuddin
For vim users, there is an awesome plugin to talk to postgres and a ton of
other databases called dbext.vim [https://github.com/vim-
scripts/dbext.vim](https://github.com/vim-scripts/dbext.vim) Setting it up
takes a little effort though.

------
pella
I hope someday they will support PostGIS geometry viewer - like:

[http://www.bostongis.com/blog/index.php?/archives/272-pgAdmi...](http://www.bostongis.com/blog/index.php?/archives/272-pgAdmin4-now-
offers-PostGIS-geometry-viewer.html)

------
kumarvvr
Does this work on local postgres servers??

~~~
obenn
Yes.

“The Postgres server can be hosted on-premises, in a virtual machine (VM), or
from the managed service of any cloud provider.”

------
aeroaks
I thought DBeaver is also there!

------
t0astbread
Can this do PL/pgSQL?

~~~
rachelagy
Yes, you can create functions with plpgsql as the language.

------
based2
Does a datpac already exist?

Data-tier Application Component Packages

------
fxfan
Does it have the excellent perf analysis that sql server express's client
comes with?

