pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marco Rademeyer <mrademeyer@pnp.co.za>
To: pgsql-admin@postgresql.org
Subject: ALTER TABLE help.
Date: Mon, 28 Feb 2005 17:42:37 +0200
Message-ID: <1109605357.5019.265.camel@localhost.localdomain> (raw)


Hi 

I am quite new to PostgreSQL. 

Could someone please help or gide me in the right direction. 

My problem is that I have a table with about 15 billion entries. I need
to auto increment the table for the start and then every entry after
that. 

I have create the field "num" that has the auto increment field set, but
it is only for the new fields that get added. 

  this is what I have done:
step one : CREATE TABLE num_table (num SERIAL);
step two : ALTER TABLE test_stock ALTER COLUMN num SET DEFAULT
nextval(num_table_num_seq');

But this is how far I got. 

Regards 
Marco 


Read our disclaimer at: http://www.picknpay.co.za/pnp/view/pnp/en/page5093? 
If you don't have web access, the disclaimer can be mailed to you on request. 
Disclaimer requests to be sent to it-security@pnp.co.za 
 



view thread (2+ messages)  latest in thread

Message-ID: <1109605357.5019.265.camel@localhost.localdomain>
Permalink:  ../1109605357.5019.265.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1109605357.5019.265.camel@localhost.localdomain

 · 

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-admin@postgresql.org
  Cc: mrademeyer@pnp.co.za
  Subject: Re: ALTER TABLE help.
  In-Reply-To: <1109605357.5019.265.camel@localhost.localdomain>
  References: <1109605357.5019.265.camel@localhost.localdomain>

* 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