From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Lawrence <jljatone@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump making schema output consistent.
Date: Tue, 12 Sep 2017 08:25:00 -0400
Message-ID: <32034.1505219100@sss.pgh.pa.us> (raw)
In-Reply-To: <CALOHWHW3jLQYv5x7WMKSfAMrKm8NH8we3ESUDcp4cdDu+5m-WQ@mail.gmail.com>
References: <CALOHWHV0VpsaUBRwqOcvOu-FsiFPwbCZpq2GafDjnA+_1u_g9w@mail.gmail.com>
<2916.1505162654@sss.pgh.pa.us>
<CALOHWHW3jLQYv5x7WMKSfAMrKm8NH8we3ESUDcp4cdDu+5m-WQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
James Lawrence <jljatone@gmail.com> writes:
> Your explaination is also a little confusing, just for clarity going to ask
> some explicit questions.
> 1) 'Ordinarily PG will preserve column order faithfully.' what is column
> order? do you just mean the order in which columns were added to a table?
> your example implies this.
Whatever the table's column order is, as shown by e.g. "SELECT * FROM tab".
> 2) what is the difference between 'PG' and pg_dump? (I'm reading it as PG =
> postgresql server process, pg_dump as the dump tool).
In this case I was using it to mean the whole system, server and pg_dump
both.
> given that I've correctly understood your email, it doesn't directly
> address the issue I'm pointing out with column order in the schema dump.
Well, then I'm confused. But you certainly haven't given enough
information for anyone to do more than guess at what your issue is.
> Given the fact without any schema details you hit on the fact these tables
> happen to use table inheritance, I'm inclined to lean towards that being
> the root cause of the differences in the schema dumps between machines.
It seems likely to me that it's something like this type of difference
having bit you when these databases were set up, ie the column orders
are already different on your two source databases. Perhaps one was
made by dump/restore from the other, and the original had already had
some order-affecting DDL done on it.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, jljatone@gmail.com
Subject: Re: pg_dump making schema output consistent.
In-Reply-To: <32034.1505219100@sss.pgh.pa.us>
* 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