Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2013

    Unanswered: new and old record in postgres

    Hi all :-)
    how i can scan the NEW or OLD record that postgres create when a trigger start?

    i want the value and the name of the key of the OLD/NEW record (because i don't know the table tha fire the trigger).

    i have think to scan pa_attribute with the name of the table and save it the variable col pg_attribute.attname%TYPE

    after i loop the name of the column from col but when i use NEW.col i have the error: il record "new" non ha un campo "col"

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Are you trying to write a single trigger that will be used on multiple tables?
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts