Thanks, I had checked the example before but couldn't make sense out of it in terms of wrapping it in Objective-C. I left it in C now and it works fine. The trigger I am using now looks like this: CREATE FUNCTION notify_trigger() RETURNS trigger AS $$ DECLARE BEGIN IF ( TG_OP = 'INSERT' ) THEN execute 'NOTIFY ' || TG_TABLE_NAME || '_' || TG_OP || ', ' || NEW.oid; ELSE execute 'NOTIFY ' || TG_TABLE_NAME || '_' || TG_OP || ', ' || OLD.oid; END IF; return NULL; END; $$ LANGUAGE plpgsql; it works if I remove transmission of the OID. If I do transmit the OID I get DETAIL: The tuple structure of a not-yet-assigned record is indeterminate. CONTEXT: PL/pgSQL function "notify_trigger" line 1 at EXECUTE statement Am 30.04.2012 um 09:53 schrieb Albe Laurenz:
|