• Tom Lane's avatar
    Reclassify DEFAULT as a column_constraint item in the CREATE TABLE syntax. · 31d2efae
    Tom Lane authored
    This is how it was documented originally, but several years ago somebody
    decided that DEFAULT isn't a type of constraint.  Well, the grammar thinks
    it is.  The documentation was wrong in two ways: it alleged that DEFAULT
    had to appear before any other kind of constraint, and it alleged that you
    can't prefix a DEFAULT clause with a "CONSTRAINT name" clause, when in fact
    you can.  (The latter behavior probably isn't SQL-standard, but our grammar
    has always allowed it.)
    
    This patch responds to Fujii Masao's observation that the ALTER TABLE
    documentation mistakenly implied that you couldn't include DEFAULT in
    ALTER TABLE ADD COLUMN; though this isn't the way he proposed fixing it.
    31d2efae
alter_table.sgml 34.8 KB