Session persistence

This commit is contained in:
2019-10-08 23:24:25 +02:00
parent c996881547
commit 9b7324e20a
20 changed files with 258 additions and 50 deletions

View File

@@ -1,11 +1,7 @@
CREATE OR REPLACE FUNCTION set_updated_timestamp()
RETURNS TRIGGER AS $$
BEGIN
IF row(NEW.*) IS DISTINCT FROM row(OLD.*) THEN
NEW.updated_at = now();
RETURN NEW;
ELSE
RETURN OLD;
END IF;
NEW.updated_at = now();
RETURN NEW;
END;
$$ language 'plpgsql';