The purpose of this post is expressed in the following adage, “Those who forget about the PostgreSQL History Log after accidentally deleting a query are doomed to retype it.”
Somehow I lost a query I was working on yesterday. Too many query windows open or something, but probably I lost it because it was a Saturday. You always pay the weekend coding toll in some way or another. Before becoming too stressed I remembered the PostgreSQL History Log.
In the Navicat Premium IDE the history log is viewable with CTRL-H or from the menu.
I remembered using “CamelCase” in my code, so that would serve as a unique term for tracking down my code in the log. A copy-n-paste from Navicat into Gedit, a quick search and thar' she is!
So next time you lose some sql code you were working on, remember the PostgreSQL History log.