Thread

  1. foreign key lost

    mikeo <mikeo@spectrumtelecorp.com> — 2000-07-07T18:25:15Z

    hi, i accidently deleted a foreign key trigger from pg_trigger
    and now cannot get at the table.  i get the message:
    
    ERROR:  RelationBuildTriggers: 1 record(s) not found for rel feature_code
    
    can anyone give me a shovel :)
    
    or a little help to get out of this please?
    
    TIA,
      mikeo
    
    
  2. Re: foreign key lost

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-07-07T18:34:48Z

    mikeo <mikeo@spectrumtelecorp.com> writes:
    > hi, i accidently deleted a foreign key trigger from pg_trigger
    
    Did you reach into pg_trigger and delete the record yourself, or did
    a system bug cause the problem?
    
    > and now cannot get at the table.  i get the message:
    > ERROR:  RelationBuildTriggers: 1 record(s) not found for rel feature_code
    > can anyone give me a shovel :)
    > or a little help to get out of this please?
    
    You'll need to tweak the table's pg_class entry so that its reltriggers
    column shows the same number of triggers that are actually there for it
    in pg_trigger.  A quick "UPDATE pg_class" should get you out of it.
    
    			regards, tom lane
    
    
  3. Re: foreign key lost

    mikeo <mikeo@spectrumtelecorp.com> — 2000-07-07T18:51:27Z

    thanks, i just discovered that before i got your message.
    now that i have that shovel, maybe i should whack myself
    with it!!!  :)
    
    thanks again,
    mikeo
    
    
    At 02:34 PM 7/7/00 -0400, Tom Lane wrote:
    >mikeo <mikeo@spectrumtelecorp.com> writes:
    >> hi, i accidently deleted a foreign key trigger from pg_trigger
    >
    >Did you reach into pg_trigger and delete the record yourself, or did
    >a system bug cause the problem?
    >
    >> and now cannot get at the table.  i get the message:
    >> ERROR:  RelationBuildTriggers: 1 record(s) not found for rel feature_code
    >> can anyone give me a shovel :)
    >> or a little help to get out of this please?
    >
    >You'll need to tweak the table's pg_class entry so that its reltriggers
    >column shows the same number of triggers that are actually there for it
    >in pg_trigger.  A quick "UPDATE pg_class" should get you out of it.
    >
    >			regards, tom lane
    >