From: | Louis Bertrand <louis(at)bertrandtech(dot)on(dot)ca> |
---|---|
To: | Jim Richards <grumpy(at)cyber4(dot)org> |
Cc: | pgsql-general(at)hub(dot)org |
Subject: | Re: [GENERAL] ownership of DBs and tables? |
Date: | 2000-02-17 04:15:54 |
Message-ID: | Pine.BSO.4.20.0002162314190.20721-100000@grendel.bts |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)bertrandtech(dot)on(dot)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
>
>
> ************
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | mathprof | 2000-02-17 04:22:39 | Deleting large objects sans index |
Previous Message | Jim Richards | 2000-02-17 03:19:39 | Re: [GENERAL] ownership of DBs and tables? |