Philip Warner wrote:
> At 08:42 19/04/01 -0500, Jan Wieck wrote:
> [...]
> >    and  the required
> >    feature to correctly restore the tgconstrrelid is already  in
> >    the  backend,  so  pg_dump  should make use of it
>
> No problem there - just tell me how...

    Add  a  "FROM <opposite-relname>" after the "ON <relname>" to
    the CREATE CONSTRAINT TRIGGER statements. That's it.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Fri, 20 Apr 2001 11:29:10 -0500 (EST)
Jan Wieck <JanWieck@Yahoo.com>
Re: Re: [BUG?] tgconstrrelid doesn't survive a   dump/restore
On Sat, 21 Apr 2001, Philip Warner wrote:

> At 11:29 20/04/01 -0500, Jan Wieck wrote:
> >Philip Warner wrote:
> >> At 08:42 19/04/01 -0500, Jan Wieck wrote:
> >> >    and  the required
> >> >    feature to correctly restore the tgconstrrelid is already  in
> >> >    the  backend,  so  pg_dump  should make use of it
> >>
> >> No problem there - just tell me how...
> >
> >    Add  a  "FROM <opposite-relname>" after the "ON <relname>" to
> >    the CREATE CONSTRAINT TRIGGER statements. That's it.
> >
> 
> I'll make the change ASAP.

Woo-hoo! Thanks.

I posted a plpgsql script yesterday that tries to restore the name if it's
already been lost to a dump/restore cycle.

It would be a more robust solution if, instead of relying on pgconstrname,
I could get into the trigger arguments. However, these does not seem to be
any way for me to do this from plpgsql, as the functions for manipulating
bytea fields aren't very useful for this, an I can't coerce bytea into
text or anything like that.

Can anyone offer help on this? If I can get into the real args, I'll fix
up the script so that it can be run once by the people w/o tgconstrrelid,
and then, once Philip's done his work, we'll never lose it again! :-)

-- 
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington


Fri, 20 Apr 2001 13:04:15 -0400 (EDT)
Joel Burton <jburton@scw.org>
Re: Re: [BUG?] tgconstrrelid doesn't survive a    dump/restore
At 11:29 20/04/01 -0500, Jan Wieck wrote:
>Philip Warner wrote:
>> At 08:42 19/04/01 -0500, Jan Wieck wrote:
>> >    and  the required
>> >    feature to correctly restore the tgconstrrelid is already  in
>> >    the  backend,  so  pg_dump  should make use of it
>>
>> No problem there - just tell me how...
>
>    Add  a  "FROM <opposite-relname>" after the "ON <relname>" to
>    the CREATE CONSTRAINT TRIGGER statements. That's it.
>

I'll make the change ASAP.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Sat, 21 Apr 2001 10:29:33 +1000
Philip Warner <pjw@rhyme.com.au>
Re: Re: [BUG?] tgconstrrelid doesn't survive a  
  dump/restore
>>
>>    Add  a  "FROM <opposite-relname>" after the "ON <relname>" to
>>    the CREATE CONSTRAINT TRIGGER statements. That's it.
>>
>
>I'll make the change ASAP.
>

I'm about to do this - does anyone object to me adding the 7.0 backward
compatibility changes at the same time?


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Tue, 24 Apr 2001 16:26:13 +1000
Philip Warner <pjw@rhyme.com.au>
pg_dump & 7.0
>
>I'll make the change ASAP.
>

Now in CVS along with PG 7.0 compat. code.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

Wed, 25 Apr 2001 22:28:50 +1000
Philip Warner <pjw@rhyme.com.au>
Re: Re: [BUG?] tgconstrrelid doesn't survive a   
  dump/restore