/* once fonksiyon yazilir */ CREATE OR REPLACE FUNCTION "PushNotification"."PushNotificationMobileIdentifierLog_update_trigger_fnc"() RETURNS trigger AS $$ BEGIN INSERT INTO "PushNotification"."PushNotificationMobileIdentifierLog_Repl" ( "Id", "UserId", "UserTypeId", "Identifier", "IsActive", "CreationDate","Operation" ) VALUES(NEW."Id", NEW."UserId", NEW."UserTypeId", NEW."Identifier", NEW."IsActive", NEW."CreationDate",'U'); RETURN NEW; END; $$ LANGUAGE 'plpgsql';
/* sonra trigger olusturulur, yukaridaki fonksiyon execute edilir */ CREATE TRIGGER "PushNotificationMobileIdentifierLog_update_trigger" AFTER UPDATE ON "PushNotification"."PushNotificationMobileIdentifierLog" FOR EACH ROW EXECUTE PROCEDURE "PushNotification"."PushNotificationMobileIdentifierLog_update_trigger_fnc"();