Marco Bomben <marco.bomben@gmail.com> writes:
> I've a problem in understanding the "SET DEFAULT" command.
> fssr2db=# ALTER TABLE fssr2calibs ALTER COLUMN intvbn SET DEFAULT 139;
> ...
> So I do see the effects of SET DEFAULT on the table as a whole (through \d
> <table name>)
> but not on each row (I set the value for some of them and for some not
> before using SET DEFAULT).
SET DEFAULT only establishes a default to use in future INSERT
operations; it doesn't affect any existing rows. Perhaps you want
to do something like
UPDATE fssr2calibs SET intvbn = 139 WHERE intvbn IS NULL
in addition to setting the default?
regards, tom lane