2ndQuadrant / audit-trigger

Simple, easily customised trigger-based auditing for PostgreSQL (Postgres). See also pgaudit.
Other
659 stars 241 forks source link

Function error when inserting new row. #19

Open nipo1000 opened 9 years ago

nipo1000 commented 9 years ago

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(vaultscanning.rolls) does not exist LINE 1: SELECT hstore(NEW.) - excludedcols ^ 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 9 years ago

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; ....