Re: elegant way to fill a table with serial

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: elegant way to fill a table with serial
Date: 2007-12-06 05:16:03
Message-ID: 3754.1196918163@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> ... BTW I saw there is no OWNED BY in 8.1, is there any other way to
> auto-drop sequences when columns get dropped?

In previous versions, a sequence object that was auto-created as a
result of a SERIAL column declaration will be auto-dropped when that
column is dropped. 8.2's OWNED BY syntax is just a way of exposing
that mechanism more formally, and letting you tweak the state.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Johanson 2007-12-06 06:57:08 Re: Synthesize support for Statement.getGeneratedKeys()?
Previous Message Tom Lane 2007-12-06 04:39:22 Re: 7.4 end of life