David,
> UPDATE pg_attribute
> SET attnotnull = 't'
> WHERE attname = 'primary_oc__id'
> AND attrelid in (
> SELECT pg_class.oid
> FROM pg_class
> WHERE relkind='r'
> AND relname='element__site'
> )
Looks good to me, provided that you aren't using SCHEMA in your design, which
I belive you're not.
BTW, what's with the double underscores in the object names?
--
Josh Berkus
Aglio Database Solutions
San Francisco