Skip site navigation (1) Skip section navigation (2)

Re: FK disappeared in 8.3.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Achilleas Mantzios" <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: FK disappeared in 8.3.3
Date: 2010-11-22 16:11:12
Message-ID: 27456.1290442272@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> wrote:
>> I am puzzled about the differences in the schema, if any one has
>> any ideas  of why this might be happening, would be great.
 
> My first guess is that they were dumped by pg_dump executables from
> different versions.

The differences do look suspiciously related to past cross-version
changes.  I do not think they can be explained entirely by pg_dump
differences, though.  In particular, there's no way that pg_dump
could have caused the reported change in a view definition from
ANY(ARRAY[...]) to a list of ORs.  What seems most likely to me is
that that view was originally entered as
	WHERE machclasses.id IN (1, 2, 16, ...)
Backends since 8.2 will translate that into ANY(ARRAY), which is how
it'll get reverse-listed by \d or pg_dump.  Older versions produced
the list-of-ORs translation.  I think the "bad" dump somehow traces
its lineage to an 8.1 or older installation.  The other issues look
like they could possibly be explained by either forcing pg_dump to
dump from a newer server major version (which until recently you
could force with -i, but the resulting dump would likely have issues)
or trying to load a dump script into an older major server version
than it was designed for (and ignoring the ensuing error messages).

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: ttDate: 2010-11-22 16:36:25
Subject: Re: Find all running postgres DB servers on a network
Previous:From: Achilleas MantziosDate: 2010-11-22 15:57:18
Subject: Re: FK disappeared in 8.3.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group