PgBrowser - A Win32 GUI for postgreSQL databases
by J.A.Fitze, Frankfurt am Main

The PgBrowser application provides a Win32 GUI client for postgreSQL databases. It might be useful for developers, testers, application supporters - but does (currently) not contain any utilities related to database administration.

System requirements

A local postgreSQL installation is not required.

Features

▶ Easy installation

Just unpack the PgBrowser-1.1.zip file into a folder of your choice and create an icon for PgBrowser.exe. That's it. No installation of any java or .net package is needed, also adminstrator privileges are not required. Please see also the installation hints below.

▶ Detailled information for all database objects

PgBrowser shows all tables, views, functions, custom types, domains etc along with their details.

▶ Low memory footprint

The result of database queries might be large. 500.000 rows ? No problem. PgBrowser keeps the data of query result tables in temporary files and holds only few rows in its internal cache. By doing so, the application is able to deal even with large data (with a size of approx. up to 300 MB).

▶ Data Viewers

PgBrowser provides viewers for XML, JSON/JSONB, composite data, arrays, multiranges and binary data. You maintain pdf or jpg data in a bytea column ? Just double click the table cell to view it.

For example: the textual presentation of nested composite data is hard to read - PgBrowser will show it as a pretty JSON print.
For bytea data PgBrowser will try to recognize the mime type from the header bytes and allows to view the data using the Windows default application for that type.

▶ Query builder

A basic query builder allows to setup a SELECT statement for a hierarchy of joined tables. This is helpful if you have to deal with many columns. At least you get a skeleton for the needed statement - any refinement can be added manually in the editor.

▶ Query editor

The query editor provides syntax highlighting, zooming, drag & drop, multiple clipboards, the maintainance of code snippets, bookmarks, custom colors and several functions available via the right-click context menu.

▶ File upload utility

Sometimes it's necessary to get large XML, JSON or binary data into the database. Did you ever try to insert a 50 MB XML to a table with the means of a string literal ? The postgreSQL server will probably return an error message due to stack issues. PgBrowser makes it easy to upload such data from a file (with a size of up to 250 MB) into an upload table of the database. The data will be stored as bytea - the builtin postgreSQL function convert_from makes it easy to convert it to text or XML or JSON.

▶ Maintenance of SQL scripts

PgBrowser allows it to store scripts in it's local SQLite database and to arrange them in a tree hierarchy. Also external .sql scripts can be added to the tree. On this way, they are only one click away to get loaded into the editor.

At a first glance

The main window of the application comes with a clear and compact user interface, which is easy to use.

The main commands are available via the toolbar buttons. Specific commands will be shown in the right-click context menu of the particular items.

The tools window in the left pane shows in it's DB tab the database items from the public and user defined namespaces. To speed up the startup time, items from the system namespaces pg_catalog and information_schema will initially not be shown. They can be loaded by pressing the SYS toolbar button and will be displayed in a separate tab.

To execute one or more SQL statements, mark them in the Query Editor and press the Execute button in the toolbar ( or F5 ). If nothing is marked, then the whole script will be executed. All result tables will be added to to the stack of result tables in the lower right pane.

A detailled description is given in the User Guide PgBrowser.chm which is part of the package.

Codepage considerations

PgBrowser uses the local Windows codepage, for example Windows-1252. If the database uses codepage UTF8 (like recommended), then the neccessary character conversions will be done. Otherwise not.

License

PgBrowser is published under the terms of a proprietary license:

Installation hints

Support

If you should recognize any issue, then please send a mail to info@pgbrowser.net.

FAQ

When I try to start a second instance of PgBrowser I get an error message saying that the file pginfo.sqlite would be locked by an other program. How to avoid it ?

PgBrowser uses the internal sqlite database pginfo.sqlite to store a hierarchy of scripts, code snippets, the file paths of the currently used temporary files and several settings. Due to that reason the application needs exlusive access to this file, which is located in the PgBrowser installation folder. To run a second instance at same time, you would need to copy the program folder and setup a second program icon. Note, that PgBrowser should not be running while copying the folder.

What happens with the temporary files if PgBrowser should terminate abnormally, caused for example by an automatic computer restart ?

PgBrowser registers all created temporary files in its local sqlite database. In case of an abnormal termination PgBrowser will remove these files on next program start.
Please note: after an abnormal program termination the software lock ( a flag ) will still be set in the local sqlite database. On next program start PgBrowser will recognize it and ask you, whether you really want to continue. This question can then be anwerded with YES.

I use already for other applications a Connection Service File, which is refered by the environment variable PGSERVICEFILE. Do I need to create an other Connection Service File for PgBrowser ?

This is recommended. If the environemnt variable PGBROWSER_SERVICEFILE is not set, then PgBrowser will use the file refered by PGSERVICEFILE. But in this case PgBrowser will not offer to store an encrypted password in that file for the selected service. Due to that reason, the environment variables PGSERVICEFILE and PGBROWSER_SERVICEFILE should not refer to the same file.

Is there any Unix version of PgBrowser available?

No, currently not.