From: Tim Landscheidt <tim@tim-landscheidt.de>
To: pgsql-sql@postgresql.org
Subject: Getting a list of a table's attributes that are sortable sorted by uniqueness
Date: Fri, 30 Dec 2011 01:07:39 +0000
Message-ID: <m3vcoyx3xg.fsf@passepartout.tim-landscheidt.de> (raw)
Hi,
I frequently use pg_dump to dump databases and compare them
with diff. To get rid of most "false positives", I'd like
to patch pg_dump to sort the table so that its dumped order
isn't changed more than necessary by insertions & Co.
So I'm looking for a query that will return a list of a
table's attributes that are sortable (e. g. no XML fields)
and sorted by "uniqueness", i. e. first attributes repre-
senting the primary key, then other unique keys, then the
rest.
Before I dive into the depths of PostgreSQL's system cata-
logues, has anyone already solved this problem?
TIA,
Tim
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: tim@tim-landscheidt.de
Subject: Re: Getting a list of a table's attributes that are sortable sorted by uniqueness
In-Reply-To: <m3vcoyx3xg.fsf@passepartout.tim-landscheidt.de>
* 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