On Sat, 27 Nov 1999, Lamar Owen wrote:

Lamar,

> Hmmmm.. Without any of the PostgreSQL envvars defined, on 6.5.3, I (as
> user lowen) can successfully create and destroy db's -- lowen has create
> database rights.

  I think that I'm missing something very basic here, for I still cannot
create a db. As a user (with priviledges to create and destroy db's), I cd
to PGDATA2 (in my case ~/accounting/paisley) and issue the command:

        createdb -D PGDATA2 test
or
        createdb -D /home/rshepard/accounting/paisley test

only to get the same error:

[rshepard@salmo paisley]$ createdb -D PGDATA2 test
ERROR:  Unable to locate path 'PGDATA2/test'
        This may be due to a missing environment variable in the server
createdb: database creation failed on test.

  This is after I moved PGLIB, PGDATA and PGDATA2 to /etc/profile.

  When I'm logged in as user postgres, I can create test databases in
/var/lib/pgsql. So, obviously, I'm not seeing what's right in front of my
face.  
 
> Amazingly enough, I've never had the need of separately defining those
> environment variables in my applications, as the only place they are
> essential is when starting the postmaster (and I use the -D switch to
> postmaster in the RPM init script to start postmaster -- PGDATA and
> PGLIB are never defined (although they need to be, to prevent
> problems)).  The PGPORT envvar becomes important for psql (IIRC).

  Hmmm-m. I don't recall reading about PGPORT. Following your suggestion, I
moved the other environment variables to /etc/profile.
 
> Oh, BTW, I think the regression results you mailed me are due to locale
> settings, as they seem to all be collation-order-dependent.

  That's interesting. I specified no locales, just installed the rpms.
 
> The RPM environment is substantially different in scope and attitude
> than the typical PostgreSQL installation, since RedHat elected, back at
> RH Linux version 5.0, to ship PostgreSQL RPM's as part of the base
> distribution -- which meant things had to be moved around due to
> RedHat's desire to be FHS 2.0 compliant (the short of it is that an FHS
> 2.0 compliant distribution cannot touch /usr/local in any way, shape, or
> form).

  As a relatively new user of linux (almost two years), this doesn't make
sense to me. PostgreSQL ought to go in /usr or /usr/local since it's an
application, not a part of the kernel or OS utilities or required tools.
Some folks (foolish thought they may be) might actually prefer another dbms
over PostgreSQL. They sould be able to not install pgsql and put in whatever
they want -- in /usr or /usr/local.

Thanks again,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)         
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | [EMAIL PROTECTED]


************

Reply via email to