postgresql

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Postgres from RH6.0 CDROM missing database templates
From: "Sergio A. Kessler" <ser@perio.unlp.edu.ar>
Date: Sat, 29 May 1999 00:04:05 -0300


David HM Spector <spector@zeitgeist.com> wrote:

>Is it my imagination?  Or, is the version of Postgres that
>ships on the RH6 CD (postgresql-6.4.2-3) missing the data
>RPM..?  When I installed Postgres from the CD all the
>binaries are there but /var/lib/pgsql is empty.

>The startup script in etc/rc.d/init.d definitely thinks
>that the database templates should be there...

if there were a postgresql-data package it could override your current
database.

the solution is to do:
initdb --pg_lib=/usr/lib/pgsql --pg_data=/var/lib/pgsql

===

Subject: pgaccess
From: Paul Breedlove <linux@nec.multinet.com>
Date: Mon, 31 May 1999 19:35:36 -0700


I have Redhat Linux 6.0 with Postgresql installed and working with psql.
I want to try pgaccess, but when I run it, I get the following error:

Error in startup script: couldn't load file "libpgtcl.so": libpg.so.1:
cannot open shared object file: No such file or directory while
executing
"load libpgtcl.so"
    (procedure "main" line 6)
    invoked from within
"main $argc $argv"
    (file "/usr/bin/pgaccess" line 4954)

I downloaded the current version of pgaccess, and the readme said that
all I needed to do was copy the .so files from the ftp.flex.ro/pgaccess
site and copy them to the /usr/lib directory. I did that but still get
the above error. What am I doing wrong?
 
===

Subject: Re: pgaccess
From: Hal Burgiss <hdb@iglou.com>
Date: Mon, 31 May 1999 23:30:47 -0400


On Mon, May 31, 1999 at 07:35:36PM -0700, Paul Breedlove wrote:
> I have Redhat Linux 6.0 with Postgresql installed and working with psql.
> I want to try pgaccess, but when I run it, I get the following error:
> 
> Error in startup script: couldn't load file "libpgtcl.so": libpg.so.1:
> cannot open shared object file: No such file or directory while
> executing
> "load libpgtcl.so"
>     (procedure "main" line 6)
>     invoked from within
> "main $argc $argv"
>     (file "/usr/bin/pgaccess" line 4954)
> 
> I downloaded the current version of pgaccess, and the readme said that
> all I needed to do was copy the .so files from the ftp.flex.ro/pgaccess
> site and copy them to the /usr/lib directory. I did that but still get
> the above error. What am I doing wrong?
> 


If you haven't, try running 'ldconfig' (as root).

===

Subject: Have the postgresql rpms been fixed?
From: Robert Williams <bob@bob.usuhs.mil>
Date: Sun, 06 Jun 1999 00:21:06 +0000


Benno Senoner wrote:

> Hello,
> I upgraded a RH5.2 box to RH6.0,
> and noticed that postgres stopped working and gives me the
following
> message at boot:
>
> Starting postgresql service: Database system in directory
/var/lib/pgsql is
> not compatible with this version of Postgres, or we are unable to
read the
> PG_VERSION file.  Explanation from ValidatePgVersion: Version
number in file
> '/var/lib/pgsql/PG_VERSION' should be 6.4, not 6.3.

Postgresql won't start on fresh installs also, even if you don't have
an old database in /var/lib/pgsql.   The error message follows:

[root@p133 bob]# /etc/rc.d/init.d/postgresql start
Starting postgresql service: /usr/bin/postmaster does not find the
database system.  Expected to find it
in the PGDATA directory "/var/lib/pgsql", but unable to open file
with pathname
"/var/lib/pgsql/base/template1/pg_class".

No data directory -- can't proceed.
postmaster []
______________

The template1 directory is missing.

Is this a bug, or am I missing something?

===

Subject: Re: Have the postgresql rpms been fixed?
From: "Sergio A. Kessler" <ser@perio.unlp.edu.ar>
Date: Sun, 6 Jun 1999 18:06:51 -0300

it's not a bug, it's a feature. (Hmmm, where I've heard this ... ?)

try to do:

$ initdb --pg_lib=/usr/lib/pgsql --pg_data=/var/lib/pgsql

Sergio

===

Subject: Help: OOBE with Postgresql/PHP3
From: Joe <jtseng@tux.org>
Date: Tue, 8 Jun 1999 15:37:05 -0400 (EDT)


I'm interested in seeing what I can make with these two applications...
However I cannot get either one of these to work.

1. When I installed RH6 I noticed there was an Apache module installed in
my system for using PHP3.  Going through the PHP documentation, there was
a tiny blurb saying I needed to make a change in the srm.conf file.  I did
that and I made a sample .php3 file.  It was not processed correctly by
the web server; it just printed the script file as if it was a text file.

2. The documentation for Postgresql said you need to start the postmaster
service.  I tried to use the instructions provided in the postmaster man
pages but it didn't work.

So my question is has anyone been able to get these two products to work
out of the box and if so how?  How do you get them to work together?

===

Subject: How good is Postgres 
From: suresh@extensity.com
Date: Thu, 10 Jun 1999 16:05:06 -0700

We are planning to write a database based application in java.Its is very
data intensive.  Naturally we want the OS to be Linux. I was looking at the
databases that were available for Linux. DB2 version 6.1, Informix etc.
These are free downloadable versions. I feel that they are not complete
(striped verisons). Is that the case.

On the other hand, i have PostgresSql that came with Redhat6.0. I have not
heard about it. I was hoping if anybody could guide me out as to
* which DB is good?
* How good is PostgresSql?
* Are the downloadable versions of DB2 and informix good enough.
* Is there any other DB that is better than these

===

Subject: Re: How good is Postgres
From: aland@informix.com (Alan Denney)
Date: Thu, 10 Jun 1999 17:47:44 -0700

> suresh@extensity.com wrote:

> We are planning to write a database based application in java.Its is very
> data intensive.  Naturally we want the OS to be Linux. I was looking at the
> databases that were available for Linux. DB2 version 6.1, Informix etc.
> These are free downloadable versions. I feel that they are not complete
> (striped verisons). Is that the case.


In what respects do you consider Informix-OnLine IDS to be "stripped"?
(It's not *free*, BTW, but it's only $99 right now).


===

Subject: PostgresSQL-set up problems
From: mwkohout <mwkohout@csbsju.edu>
Date: Tue, 15 Jun 1999 11:18:08 -0500


I've been trying to set up a postgresSQL server for work, and I've
gotten nowhere.  Although this isn't a SQL mailing list, I was wondering
if I could ask for some advice.....

Here are a list of some of the things I've done:

1) Installed the rpm

2)  Attempted to run "postgres"

3)  Ran initdb, and it gives this error:

initdb does not know where to find the files that make up 
Postgres (the PGLIB directory).  You must identify the PGLIB 
directory either with a --pglib invocation option, or by 
setting the PGLIB environment variable, or by having a program 
called 'postconfig' in your search path that outputs an assignment 
for PGLIB.

What does this mean?  Is it asking for a previously created database or
something?


Any help would be greatly appreciated-I'm kind of against a wall
here....

===

Subject: Re: How good is Postgres
From: "Sergio A. Kessler" <ser@perio.unlp.edu.ar>
Date: Sat, 12 Jun 1999 09:38:19 -0300

"Charles Hixson" <charleshixsn@earthlink.net> wrote:

>Well since it's been three days...  (Someone else's answer would probably 
>be better, but...)
>
>Postgres seems to have a good reputation, but my understanding is that the
>version shipped with rh6.0 needs modifications.. 

wrong.

>and since I'm not a user, I don't remember exactly what
>those modifications were.  Something about as shipped it
>won't create a database, you need to go in and patch
>something to

no need to apply _anything_

just a 
$ initdb --pglib=/usr/lib/pgsql --pgdata=/var/lib/pgsql

will do the job

>make it do that.  (This was supposed to be so that you wouldn't
>inadvertently delete a pre-existing database during the install, but it
>meant that if you didn't already have one it didn't install properly.

true.

===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Tue, 15 Jun 1999 13:17:02 -0400 (EDT)


> I've been trying to set up a postgresSQL server for work, and I've
> gotten nowhere.  Although this isn't a SQL mailing list, I was wondering
> if I could ask for some advice.....
> 
> Here are a list of some of the things I've done:
> 
> 1) Installed the rpm

There are three rpms. You installed all three, right? If you're using the
Red Hat 6.0 CD, they made a mistake and only included two of the three
rpms.

> 2)  Attempted to run "postgres"
> 
> 3)  Ran initdb, and it gives this error:

Sounds like the missing rpm problem. I think you're missing the data rpm,
but I could be wrong. I skipped the 6.0 update of postgres because I had
heard there were problems. I'm using other RPMs.

===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Tue, 15 Jun 1999 14:49:27 -0400 (EDT)


> Which RPMs did you use?  Were they  contrib.redhat or where?

To be honest, I don't remember if I got them off of the Rufus RPM
Repository or if I got them from somebody on the PostgreSQL list. They are
for v6.4.2 and I can make them available to you. Also, I noticed there's a
forth rpm I had forgotten which is the developer RPM.

Anonymously ftp into vishnu.ev.net and you will see them. My companies
network connection is not very fast, so please don't everybody go after
them if there's a bunch of you lurking on this topic looking for a
similar solution. I'm not trying to be an RPM repository. So e-mail me
directly if you're planning on downloading those RPMs, and if demand is
too high (which I doubt, but you never know) we'll make other plans.

There's a version of php3 (3.0.8) which is compiled with postgresql and
xml included that you can use right along with postgresql if that's where
you're headed.

===

Subject: Re: PostgresSQL-set up problems
From: Trevor Astrope <astrope@e-corp.net>
Date: Tue, 15 Jun 1999 15:37:24 -0400 (EDT)


Hi, RH didn't include the data rpm this time around, because it would
trash any databases you had from previous distributions in the case of
upgrades.

Here's how to create them yourself:

su - postgres
export PGLIB="/usr/lib/pgsql"
export PGDATA="/var/lib/pgsql"
initdb
===

Subject: Re: PostgresSQL-set up problems
Date: Tue, 15 Jun 1999 19:24:13 -0400
From: trixer <trixer@suntrix.com>

First off you need a user postgres.  In that users $HOME you need to have this
in its .bashrc:

PATH=$PATH:$HOME/bin:/usr/local/pgsql/bin
MANPATH=$MANPATH:/usr/local/pgsql/man
PGLIB=/usr/local/pgsql/lib
PGDATA=/usr/local/pgsql/data 
--- snip.

After that you need an init script to start postgresql on bootup.  Here's a
sample from our company's bootup:

#! /bin/sh
# postgresql	This is the init script for starting up the PostgreSQL
#		server
#
# chkconfig: 345 85 15
# description: Starts and stops the PostgreSQL backend daemon that handles \
#	       all database requests.
# processname: postmaster
# 

# Source function library.
.. /etc/rc.d/init.d/functions

# Get config.
.. /etc/sysconfig/network

# Check that networking is up.
# Pretty much need it for postmaster.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/local/pgsql/bin/postmaster ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting postgresql SQL server: "
	su postgres -c '/usr/local/pgsql/bin/postmaster -i -S -D \
/usr/local/pgsql/data -d 3'
	sleep 1
	pid=`pidof postmaster`
	echo -n "postmaster [$pid] is now started"
	touch /var/lock/subsys/postmaster
	echo
	;;
  stop)
	echo -n "Stopping postgresql service: "
	killproc postmaster
	sleep 2
	rm -f /var/lock/subsys/postmaster
	sleep 2
	rm -f /tmp/.s.PGSQL.5432
	echo
	;;
  status)
	status postmaster
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: postgres.init {start|stop|status|restart}"
	exit 1
esac

exit 0

--- snip

after postmaster is started, and after you have logged in as the postgres user,
you can run initdb.

===

Subject: Re: Re: PostgresSQL-set up problems
From: "Paul" <rushing@shreve.net>
Date: Tue, 15 Jun 1999 21:37:36 -0500


if you are starting from a redhat 6.0 install, you just need to
1.  rpm -Uvh postgres*   (from the cd's rpms)
2.  su root
3.  su postgres
4.  initdb --PGLIB=/var/lib/pgsql

then you can start the database as root with /etc/rc.d/init.d/postgresql
start

as user postgres you can createuser <loginname>, and createdb <name>

The other thing you may want to change with redhat's default script is
/etc/rc.d/init.d/postgresql
add  -i to the command line options for starting postmaster, that let's you
connect via TCP/IP sockets (and incidently is needed for the X based
pgaccess tool)

===

Subject: Re: How good is Postgres 
From: John Summerfield <summer@OS2.ami.com.au>
Date: Wed, 16 Jun 1999 12:16:11 +0800

> We are planning to write a database based application in java.Its is very
> data intensive.  Naturally we want the OS to be Linux. I was looking at the
> databases that were available for Linux. DB2 version 6.1, Informix etc.
> These are free downloadable versions. I feel that they are not complete
> (striped verisons). Is that the case.
> 
> On the other hand, i have PostgresSql that came with Redhat6.0. I have not
> heard about it. I was hoping if anybody could guide me out as to
> * which DB is good?
> * How good is PostgresSql?

It's a toy.

> * Are the downloadable versions of DB2 and informix good enough.

Yes. However, they come with a free developer's license: for production 
use you're expected to pay for a license.

> * Is there any other DB that is better than these
> 

Beauty is in the eye of the beholder.

I've seen good reports of mysql. However, it doesn't understand relational 
integrity. In contrast, Oracle and DB2 are top-end DBMSs, well able to 
cope with terabyte+ databases (given enough hardware).

Other contenders are Informix (also a free developer's
>license) and ADABAS which I think's dirt cheap from Caldera.

> Any help would be greatly appreciated.

===

Subject: Re: PostgresSQL-set up problems
From: mwkohout <mwkohout@csbsju.edu>
Date: Wed, 16 Jun 1999 12:43:08 -0500

> >On Tue, 15 Jun 1999, mwkohout wrote:
> >> I've been trying to set up a postgresSQL server for work, and I've
> >> gotten nowhere.  Although this isn't a SQL mailing list, I was wondering
> >> if I could ask for some advice.....
> >>
> >> Here are a list of some of the things I've done:
> >>
> >> 1) Installed the rpm
> >>
> >> 2)  Attempted to run "postgres"
> >>
> >> 3)  Ran initdb, and it gives this error:
> >>
> >> initdb does not know where to find the files that make up
> >> Postgres (the PGLIB directory).  You must identify the PGLIB
> >> directory either with a --pglib invocation option, or by
> >> setting the PGLIB environment variable, or by having a program
> >> called 'postconfig' in your search path that outputs an assignment
> >> for PGLIB.
> >>
> >> What does this mean?  Is it asking for a previously created database or
> >> something?
> >>
> >>
> >> Any help would be greatly appreciated-I'm kind of against a wall
> >> here....
> >>
> >> thanks mike kohout
> >>


> >Greetings,
> >
> >First off you need a user postgres.  In that users $HOME you need to have
> this
> >in its .bashrc:
> >
> >PATH=$PATH:$HOME/bin:/usr/local/pgsql/bin
> >MANPATH=$MANPATH:/usr/local/pgsql/man
> >PGLIB=/usr/local/pgsql/lib
> >PGDATA=/usr/local/pgsql/data
> >--- snip.
> >
> >After that you need an init script to start postgresql on bootup.  Here's a
> >sample from our company's bootup:
> >
> >#! /bin/sh
> ># postgresql This is the init script for starting up the PostgreSQL
> ># server
> >#
> ># chkconfig: 345 85 15
> ># description: Starts and stops the PostgreSQL backend daemon that handles
> \
> >#        all database requests.
> ># processname: postmaster
> >#
> >
> ># Source function library.
> >.. /etc/rc.d/init.d/functions
> >
> ># Get config.
> >.. /etc/sysconfig/network
> >
> ># Check that networking is up.
> ># Pretty much need it for postmaster.
> >[ ${NETWORKING} = "no" ] && exit 0
> >
> >[ -f /usr/local/pgsql/bin/postmaster ] || exit 0
> >
> ># See how we were called.
> >case "$1" in
> >  start)
> > echo -n "Starting postgresql SQL server: "
> > su postgres -c '/usr/local/pgsql/bin/postmaster -i -S -D \
> >/usr/local/pgsql/data -d 3'
> > sleep 1
> > pid=`pidof postmaster`
> > echo -n "postmaster [$pid] is now started"
> > touch /var/lock/subsys/postmaster
> > echo
> > ;;
> >  stop)
> > echo -n "Stopping postgresql service: "
> > killproc postmaster
> > sleep 2
> > rm -f /var/lock/subsys/postmaster
> > sleep 2
> > rm -f /tmp/.s.PGSQL.5432
> > echo
> > ;;
> >  status)
> > status postmaster
> > ;;
> >  restart)
> > $0 stop
> > $0 start
> > ;;
> >  *)
> > echo "Usage: postgres.init {start|stop|status|restart}"
> > exit 1
> >esac
> >
> >exit 0
> >
> >--- snip
> >
> >after postmaster is started, and after you have logged in as the postgres
> user,
> >you can run initdb.
> >
> >Cheers!


Paul wrote:

> if you are starting from a redhat 6.0 install, you just need to
> 1.  rpm -Uvh postgres*   (from the cd's rpms)
> 2.  su root
> 3.  su postgres
> 4.  initdb --PGLIB=/var/lib/pgsql
> 
> then you can start the database as root with /etc/rc.d/init.d/postgresql
> start
> 
> as user postgres you can createuser <loginname>, and createdb <name>
> 
> The other thing you may want to change with redhat's default script is
> /etc/rc.d/init.d/postgresql
> add  -i to the command line options for starting postmaster, that let's you
> connect via TCP/IP sockets (and incidently is needed for the X based
> pgaccess tool)


I get to step 4 in that little list, and then it dies again, telling me 

[postgres@db mwkohout]$ initdb --pglib=/var/lib/pgsql/base --pgdata=~
initdb does not find the file
'/var/lib/pgsql/base/local1_template1.bki.source'.
This means you have identified an invalid PGLIB directory.
You specify a PGLIB directory with a --pglib invocation 
option, a PGLIB environment variable, or a postconfig program.

again.  Are you sure that is the correct directory?

===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Thu, 17 Jun 1999 14:21:05 -0400 (EDT)


> > There's a version of php3 (3.0.8) which is compiled with postgresql and
> > xml included that you can use right along with postgresql if that's where
> > you're headed.
> 
> Does this php3 rpm include apache or is it separate... do you know of an rpm
> compiled for apache, php3, and postgres?

The RPM for php3 is separate from Apache and has been compiled to include
the PostgreSQL libraries and the XML libraries, but minus the IMAP
libraries. Those are the changes I made to what came on the RH 6.0 CD,
which was my source for the php3 rpm.

The PostgreSQL RPMs I'm using did not come from the Red Hat 6.0 CD.

The Apache RPM I'm using is the stock RPM that came with the Red Hat 6.0
CD.

I'm using all three of these RPMs to support web sites on a RH 6.0 system.

I hope this answers your question.

===

Subject: Re: PostgresSQL-set up problems
From: Charles Galpin <cgalpin@lighthouse-software.com>
Date: Thu, 17 Jun 1999 14:33:28 -0400 (EDT)


Chuck

The php3 rpm is just a module to be used by apache. By default it supports
postgresql, but if you get the src.rpm it's an easy config change to
support mysql.

the apache that comes w/ rh6.0 is ready for this.

don't know of any apache module that comes with all three.

I'd like to see an apache+ssl+mysql rom myself (and support for postgesql
support wouldn't hurt ;) )



===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Thu, 17 Jun 1999 15:49:37 -0400 (EDT)


> The php3 rpm is just a module to be used by apache. By default it supports
> postgresql, but if you get the src.rpm it's an easy config change to
> supports mysql.
> 
> the apache that comes w/ rh6.0 is ready for this.

Yeh, although you might have to uncomment a line or two and add index.php3
and/or index.phtml to the DirectoryIndex line, or something like that.
Also, if you might not have known the php and the php3 modules are
different, and unless you need the older php module for some older
programs, you can leave php off and php3 on. (I hope I'm not propagating
false information here, but I know I've got php off with php3 on.)

===

Subject: Re: PostgresSQL-set up problems
From: Chuck Mead <chuck@moongroup.com>
Date: Thu, 17 Jun 1999 17:19:33 -0400 (EDT)


On Thu, 17 Jun 1999, Bruce Tong spewed into the bitstream:

> > > There's a version of php3 (3.0.8) which is compiled with postgresql and
> > > xml included that you can use right along with postgresql if that's where
> > > you're headed.
> > 
> > Does this php3 rpm include apache or is it separate... do you know of an rpm
> > compiled for apache, php3, and postgres?
> 
> The RPM for php3 is separate from Apache and has been compiled to include
> the PostgreSQL libraries and the XML libraries, but minus the IMAP
> libraries. Those are the changes I made to what came on the RH 6.0 CD,
> which was my source for the php3 rpm.
> 
> The PostgreSQL RPMs I'm using did not come from the Red Hat 6.0 CD.
> 
> The Apache RPM I'm using is the stock RPM that came with the Red Hat 6.0
> CD.
> 
> I'm using all three of these RPMs to support web sites on a RH 6.0 system.
> 
> I hope this answers your question.

This is the info on the rpm I'm currently running:

Name : apache_php3 Distribution: (none) Version : 1.3b6 Vendor: (none) Release :
1 Build Date: Sun May 3 11:14:24 1998 Install date: (not installed)  Build Host:
apollo.online.no Group : Networking/Daemons Source RPM:
apache_php3-1.3b6-1.src.rpm Size : 2249157 License: Freely distributable &
usable Packager : Arne Coucheron <arneco@online.no> URL : http://www.apache.org

Summary : HTTP server daemon to provide WWW services 

Description : The Apache web server is the best free web server available in the
UNIX world today. It uses HTTP (HyperText Transfer Protocol) to allow web
browsers to view documents and submit data remotely.  It has the ability to
perform a number of different functions, including proxying and caching, and
offers features such as a status monitor, dynamic type conversion, and more.
This package includes the PHP3 module which have been compiled against the MySQL
and PostgreSQL libraries.

Should this work with PostgreSQL?  We're about to begin a project which requires
php3 and postgres so I'm just trying to get all my ducks lined up.

Since you're doing this already how 'bout some advice on interfacing to postgres
from a web page... any tips?

Cheers!
===

Subject: Re: PostgresSQL-set up problems
From: Chuck Mead <chuck@moongroup.com>
Date: Thu, 17 Jun 1999 17:24:09 -0400 (EDT)


On Thu, 17 Jun 1999, Bruce Tong spewed into the bitstream:

> > The php3 rpm is just a module to be used by apache. By default it supports
> > postgresql, but if you get the src.rpm it's an easy config change to
> > support mysql.
> > 
> > the apache that comes w/ rh6.0 is ready for this.
> 
> Yeh, although you might have to uncomment a line or two and add index.php3
> and/or index.phtml to the DirectoryIndex line, or something like that.
> Also, if you might not have known the php and the php3 modules are
> different, and unless you need the older php module for some older
> programs, you can leave php off and php3 on. (I hope I'm not propagating
> false information here, but I know I've got php off with php3 on.)
> 

I've got 5.1 fully updated with RH Secure Server  (which includes the older php
as mod_php).  It works great as is but I don't think the RHSS has postgres
support built in.  The big question for me is going to be the web interface.
We're going to build a trouble log db with postgres and it's going to be web
enabled.


===

Subject: Re: PostgresSQL-set up problems
From: Charles Galpin <cgalpin@lighthouse-software.com>
Date: Thu, 17 Jun 1999 21:35:16 -0400 (EDT)


Chuck

>From this description, yes you will just need the postgresql module (might
have to be careful about versions) and with a few httpd.conf changes you
will be fine.

As far as access from php3, I can only speak for mysql and assume the
postgresql is the same - it really is easy. The syntax is very perl like, 
and if you know SQL, there is nothing to it.



On Thu, 17 Jun 1999, Chuck Mead wrote:
> 
> This is the info on the rpm I'm currently running:
> 
> Name : apache_php3 Distribution: (none) Version : 1.3b6 Vendor: (none) Release :
> 1 Build Date: Sun May 3 11:14:24 1998 Install date: (not installed)  Build Host:
> apollo.online.no Group : Networking/Daemons Source RPM:
> apache_php3-1.3b6-1.src.rpm Size : 2249157 License: Freely distributable &
> usable Packager : Arne Coucheron <arneco@online.no> URL : http://www.apache.org
> 
> Summary : HTTP server daemon to provide WWW services 
> 
> 
> Description : The Apache web server is the best free web server available in the
> UNIX world today. It uses HTTP (HyperText Transfer Protocol) to allow web
> browsers to view documents and submit data remotely.  It has the ability to
> perform a number of different functions, including proxying and caching, and
> offers features such as a status monitor, dynamic type conversion, and more.
> This package includes the PHP3 module which have been compiled against the MySQL
> and PostgreSQL libraries.
> 
> 
> 
> Should this work with PostgreSQL?  We're about to begin a project which requires
> php3 and postgres so I'm just trying to get all my ducks lined up.
> 
> Since you're doing this already how 'bout some advice on interfacing to postgres
> from a web page... any tips?


===

Subject: Re: Postgres
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Fri, 18 Jun 1999 09:11:50 -0400 (EDT)


> I'm a new user of Linux and I have to use a postgres database. I know
> Access but almost nothing about postgres. What is the postmaster ? What
> is the way to create a database : createrdb [name of the database] ?
> Nevertheless does I have to initialize postgres ?

You can read my notes from when I was in your shoes...

http://vishnu.ev.net/~zztong

... follow the PostgreSQL notes link. It should walk you through steps
like these. The postmaster, by the way, is the database server to which
you will converse with via SQL using a program called psql. Your programs
will talk to it via an API, or via some library built around that API.

===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Fri, 18 Jun 1999 09:31:45 -0400 (EDT)


> I've got 5.1 fully updated with RH Secure Server  (which includes the older php
> as mod_php).  It works great as is but I don't think the RHSS has postgres
> support built in.  The big question for me is going to be the web interface.
> We're going to build a trouble log db with postgres and it's going to be web
> enabled.

Oh 5.1. I didn't start playing with PHP until 5.2.

I've not seen Red Hat ship a version of the PHP3 RPM with PostgreSQL
support in it. The one on the 6.0 disk tried to include it if you look at
the spec file, but a typo kept it from actually being included. I don't
think anyone tried to include it in the earlier versions, but I'm just
speculating.

All of the Apache RPMs I've worked with since I started playing with PHP3
had the lines to support PHP3 in the config files, but they were commented
out. I don't expect you'll have much work to do here. If you grep the
config files on "php" you should find almost everything. I wanted to be
able to have index.php3 files, so I added that to the Directory Index
part.

PHP3 is _very_ nice for web stuff. It does a lot of things that make your
life easier. Use the web pages for a function reference, but buy the "Core
PHP Programming" book for a language reference. Support for PostgreSQL is
decently done, and most of my use of it is along the lines of "connect,
issue sql, traverse through results, close" or "build sql, connect, issue
sql, close." It's pretty painless, and you can always print your SQL to
the web page (possibly as an html comment) if you want to debug what is
getting generated.

Lately I've been mixing PHP3 and XML to render HTML based on my XML files.
The XML parser for PHP3 is cool.

===

Subject: Re: PostgresSQL-set up problems
From: Bruce Tong <zztong@laxmi.ev.net>
Date: Fri, 18 Jun 1999 09:36:57 -0400 (EDT)


> I'd like apache+mod_perl+mod_php3+postgres support. <grin>  It looks like
> it may be getting close to time to pull down the old Maximum RPM book!

For 6.0 I'm using...

Apache from 6.0, stock
PHP3 from 6.0, using SRPM, +pgsql +xml -imap
PosgreSQL 6.4.2 from somewhere else (4 RPMs to PostgreSQL w/Devel)

If it will help, I can make the PHP3 and PostgreSQL RPMs I'm using
available to you. I do not know one RPM that combines all of the others
into one big package, which seem to be what you're asking for. I hope I'm
not confused.

===

Subject: Postgres : port 5432
From: Perso <tony.devalliere@esigelec.fr>
Date: Sun, 21 Jun 1998 14:39:24 +0200

Hello !
	I'm a new user of Linux and I would like to use Postgres. The Postgres =
package is running (ps aux | grep " postgres ") but when I want to =
create a database or a user, I've this message : Is the Postmaster =
running and accepting connection at Unix socket on port 5432 ?

Can you help me ?

Tony

===

Subject: RE: Postgres : port 5432
From: "Zailo Leite" <zleite@earthlink.net>
Date: Mon, 21 Jun 1999 18:35:50 -0700

For some reason (security?) tcp access is not enabled by default... anyhoo,
first check your init scripts to see if postgres is started in your present
level. If you don't know what I'm talking about take a break and read the
docs on "SYSV initialization scripts". Then go to your postgres script and
check if it's called with a "-i" switch. That does the trick.

===


Subject: Bug with Postgresql Server and RH6.0
From: Perso <tony.devalliere@esigelec.fr>
Date: Fri, 25 Jun 1999 10:28:51 +0200

Hello !

	Yesterday, I received a message from the RH 6.0 support. The subject of =
the one was postgresql server. It said that there is a bug and the =
postgresql server don't work. We have to wait for a patch.

	Can you advice me about another database system or explain me how to =
correct this bug.

===

From: greva <greva@online.no>
Newsgroups: linux.postgres
Subject: Re: Default User?
Date: Wed, 02 Jun 1999 19:55:51 +0000

Nahuel wrote:

> I just installed Postgres in my Debian GNU/Linux box.. but i cant access
> it
> because i dont have access.. what is the first superuser
> username/password
> created by default?

Assuming that you have installed the postgresql package
properly, your "database owner" will be the user you were
logged in as installing the package, often done as user
"postgres", with the password given this user.

I suppose you are aware of the necessity of starting the
postmaster before trying to create or access a database?

===


From: "Tomek" <tszczachor@zke.com.pl>
Newsgroups: linux.postgres
Subject: Cursors, transactions and waiting users
Date: Tue, 08 Jun 1999 10:41:21 GMT

Linux kernel : 2.0.36, postgresql-6.4.2.

I run psql and begin command with transaction :
xxx=>begin work;
BEGIN
xxx=>declare kur1 cursor for select * from tab_name;

Then I run psql on second session and I try to insert something to this
table :

xxx=>insert into tab_name values ('something');

I can't finish this command until I close transaction on first session.
Why?
Does the declaring of cursor lock table and I can't insert into and update
table? But I use cursor only for viewing of table.

I understand that data in the cursor and data in table could be different,
but it is not important for me.

Can I change this in a postgres options ? Other idea?


===
===
===
Subject: [OT] picture in PostgreSQL?
From: "Hossein S. Zadeh" <hossein@bf.rmit.edu.au>
Date: Mon, 4 Oct 1999 13:17:15 +1000 (EST)


Hi there,
I wonder if anyone on this list has any experience with storing (and
retreiving) GIF and/or JPG pictures in a RDBMS (namely PostgreSQL)?

===

Subject: Re: PostgreSQL
From: Brian <signal@shreve.net>
Date: Wed, 13 Oct 1999 13:50:15 -0500 (CDT)


On Wed, 13 Oct 1999, Michael J. McGillick wrote:

> Anyone out there using PostgreSQL?  I'm trying to learn how to use it, and
> have reaed through the documentation in /usr/doc/postgres-* on my Red Hat
> 6.1 machine.  I'm pretty sure the backend is running, because netstat -tan
> shows port 5432 in use.  However, what am I supposed to do now that the
> daemon is running?
> 
> I want to be able to create a simple database, but have seen no commands
> that show me how to get from the database started up at boot-up to
> actually typing in commands at the command line.  All the documents assume
> that I've already created some sort of database.  This is what I don't
> understand how to do.  Can anyone explain this, off the list if necessary,
> or point me to some further documentation to read?

You use the createdb command to create a database.  

Then you can type a database schema in a text file and do like:

psql database.db < file.txt

or you can just run psql in interactive mode and enter your data there.  I
think their is a Postgresql howto, but not sure.  Try www.postgresql.org
and get on some of their mailing lists.

===

Subject: RE: PostgreSQL
From: "Michael R. Anderson" <mike@ferrar.wvsc.edu>
Date: Wed, 13 Oct 1999 18:21:24 -0400

There are some mailing lists for postgresql; visit
www.postgresql.org for more information.  But in general,
assuming your backend and postmaster are running (ps ax will
tell you if the postmaster is running), you would run
"createdb foo" to create a database called "foo", then run
"psql foo" to connect to the database and feed it various
SQL commands to create tables and the like. (You may want a
book such as "The Practical SQL Handbook".)  You do need to
have certain privileges to be able to create databases,
which requires becoming user "postgres",running "createuser
yourusername" and answering a few questions. The PostgreSQL
Administrator's Guide and User's Guide, though incomplete,
explain most of this stuff (after the part about regression
testing).

===

Subject: Re: PostgreSQL 
From: Joe Brenner <doom@kzsu.Stanford.EDU>
Date: Thu, 14 Oct 1999 00:03:40 -0700

Graham Hemmings <gh-work@netcomuk.co.uk> wrote: 

> I would suggest having a look at "pgaccess" under X, it is a little more 
> friendly than psql.

Freindlier in some respects, but it's also a lot buggier in
my experience (using the version shipped with RedHat 5.2).
I might run it to do some minor changes to my data
(e.g. fixing a few spelling errors), but probably not for
not much else.

psql has the advantage of not requiring a lot of mousing
around (this fits *my* definition of "freindly", at any
rate), and it's on-line help is actually quite helpful... 
which is perhaps a first in my experience. 

Here's a few hints for beginners.  If you want to check to
see if you've got a postgres daemon running, do this:

  ps ax | grep postmaster

(Note, the name of the daemon doesn't match the name of the
software.) 

If you don't have one running, do this as root: 

   /etc/rc.d/init.d/postgresql start

The documentation (when I last looked) was written presuming
that all the postgres stuff is stashed in one location in
/usr/local.  For Redhat, the important locations are
/usr/lib/pgsql and /var/lib/pgsql. 

You'll need an account on your system called "postgres" (I
would guess it's there already).  This is a copy of the
.bashrc file for the postgres account that I'm using:

   PATH=$PATH:$HOME/bin:/usr/bin
   MANPATH=$MANPATH:/usr/man
   PGLIB=/usr/lib/pgsql
   PGDATA=/var/lib/pgsql
   export PATH MANPATH PGLIB PGDATA

I believe that having these environment variables set will
make life easier for you when running "createdb" (but I'm
not sure that this is important, I've never done it
myself... you didn't need to back in the days of 5.2). 

===

Subject: Re: PostgreSQL
From: "Anthony E. Greene" <agreene@pobox.com>
Date: Thu, 14 Oct 1999 20:35:00 +0200


Joe Brenner wrote:
> 
> psql has the advantage of not requiring a lot of mousing
> around (this fits *my* definition of "freindly", at any
> rate), and it's on-line help is actually quite helpful...
> which is perhaps a first in my experience.

There are SQL manpages included in section "l" (lowercase L). So 'man l
insert' will get you a manpage on the SQL command INSERT. They're useful if
you don't have a printed SQL reference handy.

===

Subject: Re: PostgreSQL
From: Graham Hemmings <gh-work@netcomuk.co.uk>
Date: Thu, 14 Oct 1999 22:01:05 +0000

At 20:35 14/10/99 +0200, you wrote:
>Joe Brenner wrote:

> > Freindlier in some respects, but it's also a lot buggier in
> > my experience (using the version shipped with RedHat 5.2).
> > I might run it to do some minor changes to my data
> > (e.g. fixing a few spelling errors), but probably for not
> > much else.

True, it has been buggy - the version shipped with RH6.1 looks much better, 
the one shipped with RH6.0 was terrible!

===

Subject: PostgreSQL Question
From: "Michael J. McGillick" <mike@universe.ne.mediaone.net>
Date: Thu, 21 Oct 1999 14:45:36 -0400 (EDT)


Hello:

Is there a document or a book that anyone recommends to learn about and
how to use PostgreSQL on my Red Hat 6.1 machine?  I'm looking for
something that will walk me through, step-by-step, and how to configure,
add users, make sure the databse is set up and running correctly, etc.  I
want this refence not to make any assumptions on my prior Linux
experience.

I do understand that PostgreSQL can be started up by using ntsysv and
telling the system to start it at boot.  Basically, I know it's running,
but am stuck as to what the next step is.  I've heard mention of logging
in to the postgress account, adding users, etc., but the documents are not
clear at all on how to do that.  Either that or I'm not very good at this
Linux stuff (I'm leaning towards the latter) :)

Basically, I'm looking for something to take me by the hand, walk me
through setting it up, and then showing some examples of what I can do
with it.  Any advice would be appreciated.

===

Subject: Re: PostgreSQL Question
From: Alan Mead <adm@ipat.com>
Date: Thu, 21 Oct 1999 17:27:46 -0500


Mike,

You'll want to check out the actual website but I found the docs in
/usr/doc/postgresql*/postgres to be extremely enlightening.  (You did
install the docs, right?)  

Point Netscape there or make a symbolic link from your /home/httpd/html
directory to the docs (may fail depending on your Apache installation).  

The part that was helpful in installation and setup was Chapter 24 of my
guide, "Installation" under "Administrator's guide".  Assuming you've
installed binary RPM's, you can skip down to where the guide tells you to
create a .bash_profile in the PostgreSQL "superuser" (i.e., the postgres
user, NOT root) directory.  Look in /etc/passwd for the location of that
user's home, it's not under /home.  

Anyway, the Red Hat version uses different paths and I found someone else's
post most helpful, so below is mine from my RH 6.0 system.  The follow the
directions after that.  You need to do some setup before postmaster will
run.  It has regression tests.  Sounds like everything you mentioned except
it probably assumes some Linux experience but this list or one of the
comp.os.linux.* newsgroups can help if you have questions.

-Alan

--8<------------------
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME=""
# PATH=$PATH:/usr/local/pgsql/bin
# MANPATH=$MANPATH:/usr/local/pgsql/man
PGLIB=/usr/lib/pgsql
PGDATA=/var/lib/pgsql
export PGLIB PGDATA

export USERNAME BASH_ENV PATH

--8<------------------


===

Subject: Re: [HACKERS] question
From: Lamar Owen <lamar.owen@wgcr.org>
Date: Fri, 10 Dec 1999 14:11:26 -0500


Vince Vielhaber wrote:
 
> On Fri, 10 Dec 1999, Michael Meskes wrote:
 
> > I'd like to set up a system where every employee can log into an intranet
> > server and enter the time he/she spend on each of the projects. At the end
> > of the month I'd like to create a list of time per project from this data.
 
> It would seem rather trivial in PHP to do that.  I've done a number of
> database routines with PostgreSQL and PHP and most of 'em end up as less
> than a page of code (including blank lines).

Try onShore TimeSheet, which uses PostgreSQL -- www.onshoretimesheet.org

===

Subject: Re: [HACKERS] ordering RH6.1 
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 14 Dec 1999 18:28:57 -0500


Frans Van Elsacker <fve@atbib.be> writes:
> When i do the following
> CREATE TABLE BLANK (column1 varchar(5));
> INSERT  INTO BLANK (column1) VALUES ('    1');
> INSERT  INTO BLANK (column1) VALUES ('   11');
> INSERT  INTO BLANK (column1) VALUES ('  100');
> INSERT  INTO BLANK (column1) VALUES ('    2');
> then:
> SELECT * FROM BLANK order by column1;

> I received
>   1
>  100
>  11
>   2		--> mark also a not aligned output.

> and I expected
>     1
>     2
>    11
>   100

> Anybody has an idea?? 

Bizarre.  I see the expected results under both 6.5.3 and current
development sources:

play=> SELECT * FROM BLANK order by column1;

===



the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu