psql on bash on Windows

1. Windows 10 supports Subsystem for Linux.
2. psql has some issues with non-English locales under Windows, see Notes for Windows Users.

So I installed WSL, then choose Ubuntu, started Bash and executed:

pasha_golub@PASHA:~$ sudo apt install postgresql-client

Cool. Now I have native Linux psql and, of course, I want to try Pavel Stehule’s Postgres pager!


Hackers and Bugs lists migration and GMail’s filters

Hackers and Bugs are heavy loaded lists. So it’s wise to turn notification off for them. This may be done using Gmail’s filters. “Mark as Read” is the key to success.

Filters looking for terms in Subject
Filters looking for terms in Subject

Yesterday I began to receive strange notifications on my phone from GMail. First was from Stephen Frost, then from Tatsuo Ishii and so on.

I was sure that unlikely all these good people were mailing to me directly, so I opened my mail client to throw some light on the situation.

The letter from Stephen explained what is happening – pgsql-hackers and pgsql-bugs mailing lists migrated to a new software known as ‘PGLister’. You may find all details following this link

The “Subject:” header will no longer be changed to include the name of the list (for example, “[HACKERS]”).

Aha, I see now. So my filters are not working anymore. Time for changes.

If you filter your email based on those “Subject:” header insertions, you will need to adjust your filtering rules. We recommend looking at the industry standard “List-ID:” header instead.

You should use “list:” in “Has the words” field now.

Use "list: " operator instead
Use “list: ” operator instead

Then apply some labels, mark as read and, of course, never send it to Spam!

2017-11-14 09_43_41-Search results - - Microolap Mail
Apply some actions

Serial-Identity mix

As you probably know PostgreSQL 10 introduced IDENTITY columns. They are pretty much like serial columns from the first sight. To learn about differences one may refer to the perfect blog post by Peter Eisentraut.

So I was wondering what if I mix some serial with some identity. So I executed such simple query:


Of course, I got an error:

ERROR: both default and identity specified for column "id" of table "foo"
SQL state: 42601

“SQL state: 42601” stands for a syntax error. But the interesting thing is that SERIAL, as you know, converted to CREATE SEQUENCE and SET DEFAULT.

So now I know what exactly the reason of error. You cannot have both DEFAULT and IDENTITY for a column.

CHM-manual for PostgreSQL 9.6

CHM IconAs I already wrote years ago, I use PostgreSQL manuals very often since the 8.x versions. And if for earlier versions it was possible to download CHM help file, now it’s not.

PostgreSQL manual consists of the 1351 topics (and still grows!) and I don’t like the search engine on the site much. It is also worth noting that the tree of contents (TOC) in CHM version speeds up navigation a lot!

A good friend of mine Edward Smirnov obsessed with creating a utility capable to compile the manual in CHM format using a set of HTML / SGML files shipped with PostgreSQL. He managed this! The only thing missing is the Index support (HHK file in CHM archive).

However, even without this feature such manual a hundred times more comfortable for me than the online counterpart. Especially I’m excited about lightning full-text searches.

We’ve put PostgreSQL 9.6 CHM manual at MicroOLAP Database Designer for PostgreSQL
and PostgresDAC download pages, welcome to download it.

UPD By default Windows doesn’t allow using .chm files downloaded from Internet. So you should right-click on the .chm file, then Properties and then check Unblock checkbox (or Unblock button in Windows 7 and older).

Unblock CHM
Unblock CHM