Gary Stainburn wrote on 20.09.2013 18:07:
> I want to add a new page after page 2 so I try to increase the sequence number
> of each row from page 3 onwards to make space in the sequence for the new
> record. However, I get duplicate key errors when I try. Can anyone suggest
> how I get round this.
>
> Also, the final version will be put onto a WordPress web site which means I
> will have to port it to MYSQL which I don't know, so any solution that will
> work with both systems would be a great help.
>
You need to define the primary key as deferrable:
create table skills_pages
( sp_id serial not null, sp_sequence integer not null, sp_title character varying(80), sp_narative text,
primarykey (sp_id) deferrable
);