Pastebin

Paste #1546: functions.sql

< previous paste - next paste>

Pasted by tdn

Download View as text

/*
 * Support for plpgsql
 */
CREATE LANGUAGE 'plpgsql';

/*
 * Trigger function that keeps UpdateTime up to date
 */
CREATE OR REPLACE FUNCTION update_updatetime()
RETURNS TRIGGER
LANGUAGE plpgsql
AS $$
BEGIN
    NEW.UpdateTime= now();
    RETURN NEW;
END;
$$;

/*
 * Trigger function that keeps InsertTime up to date
 */
CREATE OR REPLACE FUNCTION update_inserttime()
RETURNS TRIGGER
LANGUAGE plpgsql
AS $$
BEGIN
    NEW.InsertTime= now();
    RETURN NEW;
END;
$$;

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.