pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Graham Leggett <minfrin@sharp.fm>
To: Frank Bax <fbax@sympatico.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Normalising an existing table - how?
Date: Thu, 24 Jun 2004 23:45:08 +0200
Message-ID: <40DB4B64.5080101@sharp.fm> (raw)
In-Reply-To: <5.2.1.1.0.20040624170431.04384a70@pop6.sympatico.ca>
References: <5.2.1.1.0.20040624170431.04384a70@pop6.sympatico.ca>

Frank Bax wrote:

> Do all three steps in one command:
> 
> create table newtable as (select key1, key2, money from oldtable);

How would I put the primary key of each row in newtable back into 
oldtable? Also, newtable already exists and contains data - I need to 
add normalised data to an already partially normalised database.

Regards,
Graham
--



view thread (9+ messages)  latest in thread

Message-ID: <40DB4B64.5080101@sharp.fm>
Permalink:  ../40DB4B64.5080101@sharp.fm/
Also on:    postgresql.org/message-id/40DB4B64.5080101@sharp.fm

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: minfrin@sharp.fm, fbax@sympatico.ca
  Subject: Re: Normalising an existing table - how?
  In-Reply-To: <40DB4B64.5080101@sharp.fm>

* 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