Does PostgreSQL support computed / calculated columns, like MS SQL Server? I can\'t find anything in the docs, but as this feature is included in many other DBMSs I thought
A lightweight solution with Check constraint:
CREATE TABLE example ( discriminator INTEGER DEFAULT 0 NOT NULL CHECK (discriminator = 0) );