Re: OWNER TO on all objects

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OWNER TO on all objects
Date: 2004-06-15 06:56:17
Message-ID: 40CE9D91.2010902@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I'd prefer it if OWNER TO were only added if it is actually necessary
> (or there be some option to turn it off). I don't want to edit the
> entire dump file if I want to restore the database into another SQL
> database.

There is the existing --no-owner option, which this patch respects, same
as old pg_dump.

It's not possible to dump it if necessary, as it's not possible at
restore time to know the user they are restoring as I guess.

The old pg_dump would output a session auth, and then wouldn't bother
changing it until necessary. However, with ALTER OWNER, I have to dump
it for every object, even if it's the same user.

I guess I could optimise so that if the owner matches the superuser
specified with the -S option, I wouldn't bother dumping the ALTER?

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Seymour 2004-06-15 11:40:45 Re: [HACKERS] Release 7.4.3 branded
Previous Message Christopher Kings-Lynne 2004-06-15 06:44:23 Re: OWNER TO on all objects