Обсуждение: pg_dump doesn't properly honor -O for sequences

Поиск
Список
Период
Сортировка

pg_dump doesn't properly honor -O for sequences

От
Jeff Davis
Дата:
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

Re: not bug after all, sorry for the noise

От
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

Re: pg_dump doesn't properly honor -O for sequences

От
Tom Lane
Дата:
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

Re: pg_dump doesn't properly honor -O for sequences

От
Jeff Davis
Дата:
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