컬럼 디폴트값 사용은 아래과 같습니다. syntax 는 오라클과 동일하네요.
scott@[local]:5432 scottdb#SQL> CREATE TABLE TEST(X INTEGER DEFAULT -1, Y INTEGER);
CREATE TABLE
Time: 287.837 ms
scott@[local]:5432 scottdb#SQL> INSERT INTO TEST(X,Y) VALUES(DEFAULT,100);
INSERT 0 1
Time: 62.379 ms
scott@[local]:5432 scottdb#SQL> INSERT INTO TEST(Y) VALUES(200);
INSERT 0 1
Time: 11.973 ms
scott@[local]:5432 scottdb#SQL> INSERT INTO TEST(X,Y) VALUES(NULL, 300);
INSERT 0 1
Time: 11.605 ms
scott@[local]:5432 scottdb#SQL> SELECT * FROM TEST;
x | y
------+-----
-1 | 100
-1 | 200
NULL | 300
(3 rows)
Time: 75.948 ms
scott@[local]:5432 scottdb#SQL>