Re: Open 7.3 issues - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: Open 7.3 issues
Date
Msg-id 1029385513.93691.56.camel@jester
Whole thread Raw
In response to Re: Open 7.3 issues  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
On Thu, 2002-08-15 at 00:01, Christopher Kings-Lynne wrote:
> > >     Dependency - have pg_dump auto-create dependencies when
> > loading 7.2.X
> > >     data?
> > >
> > > Are we as far as we can go here?
> >
> > The only trouble maker is foreign keys.  If there was a nice way of
> > finding foreign keys in 7.2 and prior it probably would have been
> > implemented a long time ago in pg_dump :)
> 
> What about this.
> 
> 1. Implement pg_get_foreignkey_def() or whatever

I've done the parsing of foreign key triggers required in the past for
various documentation purposes and it wasn't overly fun -- nor am I sure
it's right in all cases.

Find 3 triggers with is_constraint true between two tables that match
argument sets, split argument list by comma, first 4 aren't so useful,
the rest in pairs are source / destination columns. Foreign Key state
(deferred, match, etc.) is in the function naming convention.

If you want to give it a shot, feel free.  Whatever method is in place
will need to work on 7.3 for those who didn't use a newer pg_dump on the
older database.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Documentation DTD
Next
From: Tom Lane
Date:
Subject: Re: Open 7.3 issues