serial type question - Mailing list pgsql-sql

From postgresql
Subject serial type question
Date
Msg-id 200103191733.f2JHXdN01064@mail.postgresql.org
Whole thread Raw
Responses Re: serial type question
List pgsql-sql
I have a table that I want to add a serial type column. Is there a way 
to add it or do I have to create a new table and insert into it. I have 
experimented with:

insert into newdb (name) select name from olddb order by jobno;

however, pg does not allow the 'order by' during an insert/select

I am on version 7.0.3

Maybe I don't need to do this. What I am trying to accomplish is to 
have PG create job numbers. Today, I only have 2 workstations that 
push jobs into the server and PG tracks the job number. However, I 
have been informed that in the next 6-8 months the number of job 
creation workstations will grow to 8 - 10. 

I would like to migrate to a job number created when the insert is 
done.

Thanks for  your  help.

Ted Petrosky




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: What do I do with this error?
Next
From: "Sarathi, Vijai (CAP)"
Date:
Subject: request for tutorial on plsql