Re: OWNER TO on all objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OWNER TO on all objects
Date: 2004-06-15 03:55:01
Message-ID: 25176.1087271701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Then I made it so that pg_dump will output an OWNER TO statement after
> every object creation.

Perhaps better to put these out towards the end of the dump, not right
after the creation of the object? Or is that what you're doing?

I would envision the safest procedure as creating all objects, loading
all data, etc, then all ALTER OWNERs, then all GRANT/REVOKEs.

> * Do we need the set session auth for COPY commands still?

Not if you still own the table while loading into it (see above point).

However, this all assumes a complete dump/restore. Consider data-only
restores. Consider partial restores using pg_restore's options for
that. What happens then? It'd likely be appropriate to issue set
session auth during scenarios involving pre-existing objects.

> * Is there any reason there is no RENAME TO command for operators?

Lack of round tuits, no doubt.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-15 04:16:46 Re: Spinlock assembly cleanup
Previous Message Greg Stark 2004-06-15 03:47:14 Re: building rpms from source rpm's