Re: [GENERAL] Sequences/defaults and pg_dump

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: [GENERAL] Sequences/defaults and pg_dump
Дата
Msg-id 20060209193107.GA4265@mcknight.de
обсуждение исходный текст
Ответы Re: [GENERAL] Sequences/defaults and pg_dump  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Wed, Feb 08, 2006 at 10:57:20PM -0500, Bruce Momjian wrote:
> > > > > TODO has:

> > > > >     * %Disallow changing default expression of a SERIAL column

> > Sure, the "DROP SERIAL" I proposed would rather "change" the data type
> > to int by dropping the default and would delete referring pg_depend entries.
> > Read it more as a kind of "drop autoincrement functionality for this
> > column".

> > The problem I see (but you might see it differently) is that you can't drop
> > this autoincrement stuff without also dropping the column once you forbid to
> > change the default (yeah I know, changing the default is even worse and
> > leaves you with incorrect dependencies).

> I assume an ALTER COLUMN ... TYPE INTEGER would drop the SERIAL part.

So far it doesn't because it doesn't know the difference between serial
and int.

What about this proposal for serial columns:

- DROP DEFAULT  drops serial and removes dependencies
- SET DEFAULT   forbidden, issues a hint to DROP DEFAULT first


Is it also desired to convert an int column to a serial column?


(moving to -hackers)

Joachim

--
Joachim Wieland                                              joe@mcknight.de
C/ Usandizaga 12 1°B                                           ICQ: 37225940
20002 Donostia / San Sebastian (Spain)                     GPG key available


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Mark Woodward"
Дата:
Сообщение: Re: PostgreSQL 8.0.6 crash
Следующее
От: Greg Stark
Дата:
Сообщение: Re: PostgreSQL 8.0.6 crash