Pastebin

Paste #1329: trigger

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text

/*
 * Support for plpgsql
 */
CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';

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

New Paste


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

Go to most recent paste.