Network Computing is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Pervasive Software's PostgreSQL 8

Once the installation is finished, the installer starts a server configuration tool. This allows you to tweak settings such as the resource usage and query tuning as well as error reporting, logging and server statistics. This is one utility I wish MySQL had by default. Another excellent utility is the pgAdmin tool, which gives you a graphical management interface to the databases and users. If you can create or modify an object with the command-line interface, you can do the same operation with pgAdmin even faster. The GUI is well laid out and very simple to follow.

In Short

Beyond basic usage, the latest version has some features that make database management much easier. The first is updated ALTER TABLE support. It is now possible to change the data type of columns without having to re-create the entire table. I created a test table with a column called 'column_name' as type text and was able to change it to an integer with the command 'ALTER TABLE table_name ALTER COLUMN column_name TYPE integer.'

Another revamped feature is the Perl server-side language. Essentially, you can write SQL functions using Perl and then use them later inside queries. For example, let's define the function 'perl_max.' First, we need to tell the server that we want to use Perl on our database by running 'createlang plperl ' from a command prompt. Then, in psql, we enter the following:

CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $$
 return $_[0] if($_[0] > $_[1]);
 return $_[1];
$$ LANGUAGE plperl;

  • 1