pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to change table owner?
3+ messages / 2 participants
[nested] [flat]

* How to change table owner?
@ 2002-12-09 14:39 Anders Bogdan <anders@theworks.org>
  2002-12-09 15:35 ` Re: How to change table owner? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Anders Bogdan @ 2002-12-09 14:39 UTC (permalink / raw)
  To: pgsql-admin

Greetings!

Sort of a newbie-ish question, I haven't seen it in the archives so 
thought I'd ask.
I've created and deployed a number of databases and am now getting 
around to adding some table maintenance (a vacuum script). But, the 
script can't run as the "postgres" user. It runs as a defined db user 
"admin".. Unfortunately, in my db schema the tables are owned by 
postgres and my script doesn't have permission to vacuum.  ( I've since 
changed the schema so this won't happen in the future)
I need to change owner of the tables from postgres to admin... Granting 
all to admin apparently isn't enough. Is there are simple way to change 
table owner short of dumping, editing the dump and restoring?
redhat7.2
postgresql7.1/7.2

Thanks
Anders




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to change table owner?
  2002-12-09 14:39 How to change table owner? Anders Bogdan <anders@theworks.org>
@ 2002-12-09 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  2002-12-09 16:00   ` Re: How to change table owner? Anders Bogdan <anders@theworks.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2002-12-09 15:35 UTC (permalink / raw)
  To: Anders Bogdan <anders@theworks.org>; +Cc: pgsql-admin

Anders Bogdan <anders@theworks.org> writes:
> I've created and deployed a number of databases and am now getting 
> around to adding some table maintenance (a vacuum script). But, the 
> script can't run as the "postgres" user. It runs as a defined db user 
> "admin".. Unfortunately, in my db schema the tables are owned by 
> postgres and my script doesn't have permission to vacuum.

Make "admin" a postgres superuser.  (I think "ALTER USER admin CREATEUSER"
is the approved way to do this.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to change table owner?
  2002-12-09 14:39 How to change table owner? Anders Bogdan <anders@theworks.org>
  2002-12-09 15:35 ` Re: How to change table owner? Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-12-09 16:00   ` Anders Bogdan <anders@theworks.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Anders Bogdan @ 2002-12-09 16:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Thankyou! That worked, much easier than dumping the db..
thanks
Anders

On Monday, December 9, 2002, at 09:35  AM, Tom Lane wrote:

> Anders Bogdan <anders@theworks.org> writes:
>> I've created and deployed a number of databases and am now getting
>> around to adding some table maintenance (a vacuum script). But, the
>> script can't run as the "postgres" user. It runs as a defined db user
>> "admin".. Unfortunately, in my db schema the tables are owned by
>> postgres and my script doesn't have permission to vacuum.
>
> Make "admin" a postgres superuser.  (I think "ALTER USER admin 
> CREATEUSER"
> is the approved way to do this.)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-12-09 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-12-09 14:39 How to change table owner? Anders Bogdan <anders@theworks.org>
2002-12-09 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-12-09 16:00   ` Anders Bogdan <anders@theworks.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox