Forum OpenACS Q&A: Re: Technique for adding not null to a column created with alter table

I've posted this before, but to actually change the table definition rather than adding a separate constraint, do this:

UPDATE pg_attribute SET attnotnull = TRUE
WHERE attname = 'my_column'
  AND attrelid = (SELECT oid FROM pg_class WHERE relname = 'my_table')