From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Preserving column order when recreating table.
Date: Wed, 15 Sep 2004 11:36:49 -0400
Message-ID: <20040915153649.GB28600@phlogiston.dyndns.org> (raw)
In-Reply-To: <20040915170700.543722cf@svb.ucs.co.za>
References: <20040915142445.06b60e3e@svb.ucs.co.za>
<20040915131930.GA28290@phlogiston.dyndns.org>
<20040915162201.13be5102@svb.ucs.co.za>
<20040915170700.543722cf@svb.ucs.co.za>
On Wed, Sep 15, 2004 at 05:07:00PM +0200, Stef wrote:
> Funny you say. It looks like "Bob" had a hand in pg_dump -d , 'cause I've
> many times wished there were column names specified there, too :)
> (I'm talking Prior 7.4 here, dunno if it's changed already)
Dunno about previous, but pg_dump -D does what you want. I think the
-d switch did it this way because you can get away with that if
you're also creating the schema in the same breath. I agree that
"Bob's" fingers have left their grotty marks in plenty of places.
> is why I didn't use this solution originally. But I figured out a way to
> modify pieces of the "create table" statement to drop all the indexes
> and constraints first.
>
> Is there an easier way around this?
I doubt it.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
The plural of anecdote is not data.
--Roger Brinner
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: ajs@crankycanuck.ca
Subject: Re: Preserving column order when recreating table.
In-Reply-To: <20040915153649.GB28600@phlogiston.dyndns.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