Comment 19 for bug 2012669

Revision history for this message
Mike Rylander (mrylander) wrote :

Thanks, Blake. That helps a lot. I haven't been through all of it yet, but in the mean time, I have some initial feedback.

For the schema changes, can you change to inline column constraint syntax (our project standard) rather than table constraints? That also helps with quick review and sanity checking. Also, we generally only specify match type, deferrability, and ON-action clauses when they are not the default. As an example, instead of:

create table blah (
  id serial not null,
  other int,
 ...
  constraint blah_pkey primary key (id),
  constraint blah_other_fkey foreign key (other) references foo (id) on update ... on delete ... deferrable ...,
 ...
);

we use this:

create table blah (
  id serial primary key,
  other int not null references foo (id) deferrable initially deferred,
 ...
);

Thanks!