Re: pg_dump versus SERIAL, round N

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump versus SERIAL, round N
Date: 2006-08-20 18:19:29
Message-ID: 200608201819.k7KIJTB15827@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > What method will people use to see if a sequence used as a default is
> > one that was created by SERIAL, and will be dropped by drop table, or
> > manually created? How does that distinction show up in pg_dump?
>
> Hm. It will show in pg_dump because there will (or won't) be an ALTER
> SEQUENCE OWNED BY command, but right now the only way to see if a
> sequence is owned is to look in pg_depend for a link to a table column.
> That's how it's always been before, too --- have you noticed any
> complaints?
>
> We could consider adding something to psql's \ds display to show
> ownership, but that's definitely getting into the realm of "new feature"
> rather than "bug fix", and given the lack of past requests for it
> I can't say that I find it to be an immediate must-have.

Right. My only point is that right now SERIAL shows up in pg_dump,
while in the future it will show up as SEQUENCE OWNED BY. We just need
to look out if people get confused.

Also, if someone restores one table, does the sequence come with it like
it does now with SERIAL?

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2006-08-20 18:30:08 Re: Coverity reports looking good
Previous Message Tom Lane 2006-08-20 18:08:32 Re: pg_dump versus SERIAL, round N