Skip to content

Instantly share code, notes, and snippets.

@nhibberd
Created February 27, 2014 09:29
Show Gist options
  • Save nhibberd/9247020 to your computer and use it in GitHub Desktop.
Save nhibberd/9247020 to your computer and use it in GitHub Desktop.
CREATE TABLE test (
id SERIAL PRIMARY KEY,
test TEXT,
status CHARACTER VARYING (20) DEFAULT 'queued'
);
CREATE OR REPLACE RULE "new_test" AS
ON INSERT TO test
DO NOTIFY "new_test";
CREATE TABLE action (
id SERIAL PRIMARY KEY,
origin TEXT,
type TEXT,
name TEXT,
status TEXT,
updated TIMESTAMPTZ DEFAULT now()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment