Updated + simplified in cb187e8.


On Wed, Sep 4, 2013 at 11:05 AM, Frank Farmer <notifications@github.com>wrote:

> In sql/partitioned/triggers.sql:
>
> > @@ -0,0 +1,12 @@
> > +CREATE OR REPLACE FUNCTION poky_parent_trigger() RETURNS TRIGGER AS
> > +$$
> > +BEGIN
> > +    RAISE EXCEPTION 'No % on poky directly. Use the bucket child table.', TG_OP;
> > +END;
> > +$$
> > +LANGUAGE plpgsql;
> > +
> > +DROP TRIGGER IF EXISTS poky_parent ON poky;
> > +CREATE TRIGGER poky_parent BEFORE INSERT OR UPDATE OR DELETE ON poky
> > +        FOR EACH STATEMENT EXECUTE PROCEDURE poky_parent_trigger();
> > +
>
> Is it necessary to enforce that with a trigger? Surely you can enforce it
> at the application level instead?
>
> This makes it harder for us to, e.g. run diagnostic/repair/migration
> queries.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/drsnyder/poky/pull/21/files#r6161436>
> .
>



-- 
http://damonsnyder.net