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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top