Обсуждение: pg_dump doesn't properly honor -O for sequences
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
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
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
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