I want to share a new product with all users of the great Postgresql database. Meet -
SQL Tabs - graphical SQL console for Postgresql. This is a new GUI client in which you can view database objects, write SQL queries and build graphs.
Today you can download versions for OSX and Ubuntu. Users of other linux distributions can run the application from source. Unfortunately, there is no Windows version yet. I would like to hope that the application will appeal to the community, and there will be developers who can help in releasing packages for different platforms: rpm, debian, windows.
Some information for developers: SQL Tabs is written on the javascript stack,
electron ,
react and uses the native libpq driver to work with the database. Available under the GPL3 license.
')
Now about the main features of SQL Tabs, the differences from other similar products and the main motivation behind development.
Let's start with the process of creating a connection that is made as simple as possible: you need to enter the URL in the address bar. This is done to save time when switching between servers, especially when working with shard base.

Probably the biggest difference from such applications would be the absence of the usual tree of database objects in the left sidebar. Instead, there is a file system navigator in the spirit of the Project Window. This makes SQL Tabs look more like a text editor a la Sublime. After all, database development is not fundamentally different from any other development: SQL scripts should be stored in files, and files in git or any other scm. In this case, editing the file, you can immediately perform queries, switching between different databases on the fly.
However, the object navigator does exist, you can call it from the menu by selecting the Database Info item. The list of supported objects is still far from complete, this is exactly the area where there is still work to be done. This solution allows you to get quick access to the description of objects right at the time of writing code. For example, by typing the table name in the editor, you can press CTRL + I (CMD + I on the poppy) and see the table structure and the presence of indices without switching to another window.

Of the buns, there are still a history of completed queries with search, light and dark themes, autocompletion of keywords and object names. For geeks there is a Vim-mod.
Now my favorite feature is the visualization of the query result. The point is to build a graph from the data in the table without leaving the SQL context. Very useful for superficial data analysis. It works as follows.
SQL Tabs can use additional semantics in scripts: SQL blocks of commands that are separated using a comment line starting with three hyphens:
Such a string may additionally contain an annotation, i.e. explain how to interpret the output of SQL commands of the current block. For example, here is a query that returns the number of employees by city:
SELECT city, COUNT(*) FROM employees GROUP BY city
city | count ---------|--------- London | 245 Paris | 153 New York | 323
To visualize such data, a pie-chart suggests itself (even if this is not the most successful version of the chart). To build a graph in SQL Tabs, add an annotation before the query and click Execute Block.

For me, the most useful were the usual timeseries graphs for analyzing the growth of tables and the distribution of data over time. Here is a synthetic example of such a graph:
--- chart area-spline x=1 SELECT d::date, random() FROM generate_series(now()-interval '1 month', now(), interval '1 day') d

But a picture from a real example. The size of daily partitions and their indices:

And in the end a little about the plans. SQL Tabs is a very young product, only 4 months old. During this time, the rhythm of development was able to keep at about two releases per month. Each release, as a rule, contained one or several relatively completed features. To date, the basic concept, which should be in the first version, is implemented. The following releases are likely to be sent for revision and debugging of the declared functionality.
If you have any comments on the product - be sure to check out the issue in the official repository
github.com/sasha-alias/sqltabs . I’m sure your feedback will be very helpful in making SQL Tabs better and in the Potgresql toolset will come.