From: Richard Huxton <dev@archonet.com>
To: Graham Leggett <minfrin@sharp.fm>
Cc: Frank Bax <fbax@sympatico.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Normalising an existing table - how?
Date: Fri, 25 Jun 2004 09:37:55 +0100
Message-ID: <40DBE463.7060308@archonet.com> (raw)
In-Reply-To: <40DB4B64.5080101@sharp.fm>
References: <5.2.1.1.0.20040624170431.04384a70@pop6.sympatico.ca>
<40DB4B64.5080101@sharp.fm>
Graham Leggett wrote:
> 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.
How can newtable contain data if you don't have any keys for it?
Perhaps a fuller example, with the schemas of the tables in question
would help.
--
Richard Huxton
Archonet Ltd
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: dev@archonet.com, minfrin@sharp.fm, fbax@sympatico.ca
Subject: Re: Normalising an existing table - how?
In-Reply-To: <40DBE463.7060308@archonet.com>
* 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