Domanda

Hi I'm developing simple audit trigger in postgres server. At the moment, I'm getting old value from name column such as below line.

v_old_data := ROW (OLD.name);

It works fine, but it store the value with parentheses. Such as '(john)'. Is there any way to storing/getting value from the table without parentheses?

È stato utile?

Soluzione

Simply:

v_old_data := OLD.name;

You want the value, don't wrap it into a row and convert the whole row to text - including the parentheses that belong to the text representation of a row.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top