Linux Today: Linux News On Internet Time.

More on LinuxToday

PostgreSQL 6.4.2-5 RPM released

May 31, 1999, 02:50 (6 Talkback[s])

Seen on C.O.L.A.

New changes in Release 5 i.e postgresql-6.4.2-5*.rpm :
The following are added:
1. Combined clients, devel, data rpms into ONE single rpm. With this
   install and uninstall of postgresql will take less than 30 seconds!!

Note: Interfaces like Python, Perl, "C", "C++", Tcl/Tk,
      ecpg (Embedded C-SQL), Java JDBC and ODBC are already included.

Postgresql user-base is 10 times that of linux as it runs
on almost all platforms and all OSes. It even runs on Windows95/NT
(but Win95/NT is NOT recommended for production systems, you
can use for testing or development purposes, win32 port is
just for coverage only. Use linux for production systems)

Commercial technical support is now available from Tech support costs run from
$2000 to 10 million dollars to cover from small to very large
enterprises. All the fortune 500 companies will be using

PostgreSQL Version 6.4.2-5 RPMs are now available
PostgreSQL is a very advanced "Open Source Code" SQL server. It is
"tremendously sophisticated" and is a very powerful SQL server. It
is a "superb" SQL database system and is the default SQL server
for most of the Linux distributions - Redhat, Debian, Suse,
Slackware, etc... It's "status rank" is same as what Apache,
gcc, Linux is to Webserver, compiler, OS. It is very fast
becoming the "STANDARD SQL SERVER" engine for this world.

PostgreSQL runs on most flavors of unix - Solaris, HPUX, AIX,
BSD, SCO etc. and Microsoft Windows NT/95.
For WinNT port see -

RPMS source and binaries of PostgreSQL Version 6.4.2-5 is at:

Files are postgresql-6.4.2-5*.rpm

and will be soon available at official redhat site

More details about PostgreSQL is at

        Quick Steps to Install, Test, Verify and Run PostgreSQL
Login as root.

# rpm -qpl postgre*.rpm (to see list of files. For docs 'man rpm')
# rpm -qpi postgre*.rpm (to see info of package)
# cat /etc/passwd | grep postgres
  Note: If you see a 'postgres' user, you may need to backup and clean
  up the home directory ~postgres and delete the unix user 'postgres'
  or rename the unix user 'postgres' to something like 'postgres2'.
  Install must be "clean slate"
# rpm -i postgre*.rpm (Must install all packages clients, devel, data
         and main for pgaccess to work )
# chkconfig --add postgresql  (to start pg during booting, see 'man
# cp /usr/lib/pgsql/python/ /usr/lib/python1.5/lib-dynload (for
# /etc/rc.d/init.d/postgresql start  (to start up postgres)
# su - postgres
bash$ createdb mydatabase  (this will create a database by name
                 (for doc 'man createdb')
bash$ psql mydatabase   (for doc 'man psql')
bash$ export DISPLAY=:0.0; pgaccess mydatabase; (see 'man
  Now you can start banging away at SQL commands at pgaccess or psql !!
bash$ cd /usr/doc/postgresql*
  Here read all the FAQs, User, Programmer, Admin guides and tutorials.

More details about PostgreSQL is at

Testing PyGreSQL - Python interface
bash$ cd /usr/lib/pgsql/python
bash$ /usr/bin/python
>>> import _pg
>>> db = _pg.connect('thilo', 'localhost')
>>> db.query("INSERT INTO test VALUES ('ping', 'pong')")
>>> db.query("SELECT * FROM test")
- ----+----
(1 row)

...... Yow! Seems to work - now install it properly
bash$ su - root
# cp /usr/lib/pgsql/python/ /usr/lib/python1.5/lib-dynload

Testing Perl - Perl interface
bash$ cd /usr/doc/postgresql-6.4.2/examples/perl5
bash$ perl ./example.newstyle

Read the example files for using perl interface

Testing libpq, libpq++ interfaces
bash$ cd /usr/doc/postgresql-6.4.2/examples/libpq++
bash$ g++ -I/usr/include/pgsql
- -I/usr/include/pgsql/libpq++ -lpq++ -lpq -lcrypt
bash$ ./a.out  (Note: Ignore Error messages if you get any - as below)
> create table foo (aa int, bb char(4));
No tuples returned...
status = 1
Error returned: fe_setauthsvc: invalid name: , ignoring...
> insert into foo values ('4535', 'vasu');
No tuples returned...
status = 1
Error returned: fe_setauthsvc: invalid name: , ignoring...
> select * from foo;
aa   |bb   |
- -----|-----|
4535 |vasu |
Query returned 1 row.

Testing Java interfaces

For this you MUST install the jdk-*glibc*.rpm package (Java RPM
bash$ cd /usr/doc/postgresql-6.4.2/examples/jdbc
bash$ echo $CLASSPATH
 --> Should show  CLASSPATH=/usr/lib/jdk-1.1.6/lib/
bash$ export CLASSPATH=$CLASSPATH:.:/usr/lib/pgsql/postgresql.jar
Edit all *.java files  and comment out the 'package' line.
bash$ javac
bash$ java psql jdbc:postgresql:template1 postgres 

Testing ecpg interfaces
bash$ cd /usr/doc/postgresql-6.4.2/examples/ecpg
bash$ ecpg test1.pgc -I/usr/include/pgsql
bash$ cc test1.c -I/usr/include/pgsql -lecpg -lpq -lcrypt
bash$ createdb mm
bash$ ./a.out

Testing Tcl/Tk interfaces
Example of Tcl/Tk interfaces is pgaccess program.
Read the file /usr/bin/pgaccess using a editor -
bash$ view /usr/bin/pgaccess
bash$ export DISPLAY=:0.0
bash$ createdb mydb
bash$ pgaccess mydb

To verify the top quality of PostgreSQL, run the Regression test
package :-
Login as root -
# rpm -i postgresql*.src.rpm
# cd /usr/src/redhat/SPECS
# more postgresql*.spec   (to see what system RPM packages you need to
# rpm -bp postgresql*.spec  (.. this will prep the package)

Regression test needs the Makefiles and some header files like *fmgr*.h
which can be built by -
# rpm --short-circuit -bc postgresql*.spec ( .. use short circuit to
Abort the build by CTRL+C, when you see 'make -C common  SUBSYS.o'
By this time configure is successful and all makefiles and headers
are created. You do not need to proceed any further
# cd /usr/src/redhat/BUILD
# chown -R postgres postgresql*
# su - postgres
bash$ cd /usr/src/redhat/BUILD/postgresql-6.4.2/src/test/regress
bash$ more README
bash$ make clean; make all runtest
bash$ more regress.out

Written By: Al Dev