Ah, that makes a lot of sense. The line separating UNIX users and
PostgreSQL users was obviously fuzzy in my mind (as are many things).
Thanks
--Louis <louis@bertrandtech.on.ca>
Louis Bertrand http://www.bertrandtech.on.ca/
Bertrand Technical Services, Bowmanville, ON, Canada
OpenBSD: Secure by default. http://www.openbsd.org/
On Thu, 17 Feb 2000, Jim Richards wrote:
> At 09:58 PM 16/02/00 -0500, you wrote:
> >Is there a way of changing the ownership of tables and even entire
> >databases?
>
> Um, after the table has been created no, but you can set up users and
> accounts, so as you, try (in ksh, not sure about others)
>
> PGUSER=postgres PGPASSWORD=postgres psql template1
>
> then
>
> create user www with password "www";
>
> then when you want to run scripts, or connect then you can with
>
> PGUSER=www PGPASSSWORD=www psql -f filename.sql webdb
>
> or interactively
>
> PGUSER=www PGPASSSWORD=www psql webdb
>
> >\i filename.sql
>
> >Here's why I ask. I created a database "webdb" for a PHP3 application and
> >created a database user "www" to own it. However, I am creating the actual
> >tables as user "louis" who has superuser privileges in PostgreSQL. When
> >I look at the ownership of a new table, it's "louis", not "www". I'm
> >doing this with psql and pgaccess. I'd rather not have to su(8) as
> >"www" to perform DB maintenance.
>
>
>
> --
> An army marches as fast as its slowest stomach.
> Mr Grumpy - what are you on about?
> http://www.cyber4.org/members/grumpy/index.html
>
>
> ************
>
>
>