DEFINITIONS

Definitions More Info.
Definition ID12.086
TitlePOSTGRESQL
CategoryNOTES
Definitionupdate trigger
Definition DescriptionADAY UPDATE TRIGGER

/* 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"();
RecordBycunay
Record Date25-10-2022 11:52:05
Düzenle
Kopyala
Sil