a trigger function for PostgreSQL written in PL/TCL language.
Code: Select all
CREATE OR REPLACE FUNCTION testtcl()
RETURNS trigger AS
$BODY$
spi_exec "SELECT relname AS tgname FROM pg_class WHERE relfilenode = $TG_relid"
if {[string equal -nocase $tgname audit]} { return OK }
return [array get NEW]
$BODY$
LANGUAGE 'pltcl' VOLATILE SECURITY DEFINER
;
Now with the 2.5 version of TUniQuery, I get the following
error: "Empty macro or function name"
Is there a property to set or some other workaround so that TUniQuery won't interpret the '{' as a macro in this instance?
Thanks.