0

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?

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
user3242117
  • 35
  • 1
  • 3

1 Answers1

1

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.

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228