Function error when inserting new row.
nipo1000 opened this issue · 1 comments
nipo1000 commented
Postgresql vers.: 9.4
Table: vault_scanning.rolls
The command : SELECT audit.audit_table('rolls');
completed with no errors. However, when I insert a new row, with pgAdmin III, into the 'rolls' table I get the following error :-
An error has occurred:
ERROR: function hstore(vault_scanning.rolls) does not exist
LINE 1: SELECT hstore(NEW.) - excluded_cols
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT hstore(NEW.) - excluded_cols
CONTEXT: PL/pgSQL function audit.if_modified_func() line 49 at assignment
OK
nipo1000 commented
The following code resolved the issue !!!!! :)
....
ELSIF (TG_OP = 'INSERT' AND TG_LEVEL = 'ROW') THEN
select into audit_row.row_data hstore(new) - excluded_cols;
....