Re: Inserting preset values into a serial column - Mailing list pgsql-novice

From Chris Browne
Subject Re: Inserting preset values into a serial column
Date
Msg-id 878w544wej.fsf@cbbrowne.afilias-int.info
Whole thread Raw
In response to Inserting preset values into a serial column  (Michael Rowan <mike.rowan@internode.on.net>)
List pgsql-novice
mike.rowan@internode.on.net (Michael Rowan) writes:
> PostgreSQL 8.4.4.1
>
> Can someone pls confirm that, provided I am doing it right, I can
> insert a row into a table where the primary key is serial NOT NULL and
> a (unique) value is provided in the offered data?  I cannot see an
> answer to this specific point in the docs.

Sure, it shouldn't present a problem.  You'd presumably also want to
change the value of the sequence that underlies this in order to point
it to a value beyond the range of the "offered data."  (Use the function
"setval()" to do this.)
--
Rules of the Evil Overlord #208.  "Members of my Legion of Terror will
attend seminars  on Sensitivity  Training. It's good  public relations
for them to  be kind and courteous to the  general population when not
actively engaged in sowing chaos and destruction."

pgsql-novice by date:

Previous
From: Lew
Date:
Subject: Re: Select only active entries
Next
From: Josh Berkus
Date:
Subject: Re: [pgsql-advocacy] C Postgresql CGI