Re: drop table problem

From: frank_lupo <frank_lupo(at)email(dot)it>
To: tgl <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: drop table problem
Date: 2003-01-25 13:29:20
Message-ID: H99USW$EF04AD98EC9A78C71B4D6BEBAF55B7EB@email.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> "=?utf-8?Q?frank=5Flupo?=" writes:
> > If create a table and alter column add sequence. The relation on table and =
> > sequence is not present in pg_depend.
>
> What are you doing, exactly? ADD COLUMN foo SERIAL doesn't work yet.
>
> regression=# alter table vv add column f2 serial;
> NOTICE: ALTER TABLE will create implicit sequence 'vv_f2_seq' for SERIAL column 'vv.f2'
> ERROR: Adding columns with defaults is not implemented.
> Add the column, then use ALTER TABLE SET DEFAULT.
>
> SET DEFAULT nextval('foo') does not create an auto-drop dependency,
> and should not IMHO.
>
> regards, tom lane
>

My problem is the field already exists, and the only way to associate a sequence is this.

SET DEFAULT nextval('foo')

Tanks

Bye !!
Frank Lupo (Wolf) !!

/\_ _/\
\ o o /
--ooo-----ooo---

--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Oro, argento, diamanti e pietre preziose: una miniera di meraviglie.
Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=772&d=25-1

Browse pgsql-general by date

  From Date Subject
Next Message frank_lupo 2003-01-25 13:35:09 Re: drop table problem
Previous Message Justin Clift 2003-01-25 13:08:27 Re: Searchable 7.3.1 Documentation - now interactive!