Re: Database conversion type serial question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carol Walter <walterc(at)indiana(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database conversion type serial question
Date: 2008-03-14 15:17:31
Message-ID: 17944.1205507851@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Carol Walter <walterc(at)indiana(dot)edu> writes:
> Can I designate a column not
> previously defined as serial to serial.

"serial" is not really a type. It's just a convenience macro for
creating a sequence and setting the column's default expression.
So what you do is perform those steps manually. See
http://www.postgresql.org/docs/8.2/static/datatype-numeric.html#DATATYPE-SERIAL

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Marc Fromm 2008-03-16 19:46:25 howto restore from pg_dumpall
Previous Message Carol Walter 2008-03-14 15:05:57 Database conversion type serial question