Primary Keys in Reuslting Postgres Tables

Dear all,
Out of curiosity, I am wondering what would be the effect of explicitly
setting the "_URI" column as a primary key columns (they are currently
UNIQUE columns, but in order for postgres to allow tables to be editable
directly from the grid,rather than via SQL, they either have to have
specified a primary key or use the OID).

Thanks,
Tumaini

These are effectively primary keys (PK). I believe I defined them as UNIQUE
because a PK implies a sort order, and, since the keys are UUIDs, this did
not make sense (you would be randomly updating the B-Tree for the index,
which will hurt performance).

Give it a try; if anything, you should just see an impact on performance.

Mitch

ยทยทยท On Tue, Jul 3, 2012 at 3:40 AM, Tumaini Kilimba wrote:

Dear all,
Out of curiosity, I am wondering what would be the effect of explicitly
setting the "_URI" column as a primary key columns (they are currently
UNIQUE columns, but in order for postgres to allow tables to be editable
directly from the grid,rather than via SQL, they either have to have
specified a primary key or use the OID).

Thanks,
Tumaini

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com