pg_dump doesn't properly honor -O for sequences

Started by Jeff Davisalmost 19 years ago4 messagesbugs
Jump to latest
#1Jeff Davis
pgsql@j-davis.com

pg_dump -O apparently removes all instances of ALTER TABLE ... OWNER TO
from the output, but does not remove ALTER SEQUENCE ... OWNED BY from
the output.

Specifically this is with SERIAL sequences, which are dumped using the
ALTER SEQUENCE syntax (as of 8.2). Normal sequences are dumped using the
ALTER TABLE ... OWNER TO syntax, which properly honors -O.

Regards,
Jeff Davis

#2Jeff Davis
pgsql@j-davis.com
In reply to: Jeff Davis (#1)
Re: not bug after all, sorry for the noise

On Wed, 2007-04-25 at 11:36 -0700, Jeff Davis wrote:

pg_dump -O apparently removes all instances of ALTER TABLE ... OWNER TO
from the output, but does not remove ALTER SEQUENCE ... OWNED BY from
the output.

Specifically this is with SERIAL sequences, which are dumped using the
ALTER SEQUENCE syntax (as of 8.2). Normal sequences are dumped using the
ALTER TABLE ... OWNER TO syntax, which properly honors -O.

Sorry for the noise. I misinterpreted the meaning of OWNED BY to mean
the user who owns, not the table who owns.

Regards,
Jeff Davis

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jeff Davis (#1)
Re: pg_dump doesn't properly honor -O for sequences

Jeff Davis <pgsql@j-davis.com> writes:

pg_dump -O apparently removes all instances of ALTER TABLE ... OWNER TO
from the output, but does not remove ALTER SEQUENCE ... OWNED BY from
the output.

Why should it? That's not ownership in the same sense.

regards, tom lane

#4Jeff Davis
pgsql@j-davis.com
In reply to: Tom Lane (#3)
Re: pg_dump doesn't properly honor -O for sequences

On Wed, 2007-04-25 at 16:44 -0400, Tom Lane wrote:

Jeff Davis <pgsql@j-davis.com> writes:

pg_dump -O apparently removes all instances of ALTER TABLE ... OWNER TO
from the output, but does not remove ALTER SEQUENCE ... OWNED BY from
the output.

Why should it? That's not ownership in the same sense.

I sent a retraction of the bug report quickly afterward. My apologies.

Regards,
Jeff Davis