pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: postgresql <pgsql@symcom.com>
To: PgSQL-SQL <pgsql-sql@postgresql.org>
Subject: serial type question
Date: Mon, 19 Mar 2001 12:41:29 -0500
Message-ID: <200103191733.f2JHXdN01064@mail.postgresql.org> (raw)

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





view thread (3+ messages)  latest in thread

Message-ID: <200103191733.f2JHXdN01064@mail.postgresql.org>
Permalink:  ../200103191733.f2JHXdN01064@mail.postgresql.org/
Also on:    postgresql.org/message-id/200103191733.f2JHXdN01064@mail.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pgsql@symcom.com
  Subject: Re: serial type question
  In-Reply-To: <200103191733.f2JHXdN01064@mail.postgresql.org>
  References: <200103191733.f2JHXdN01064@mail.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox