defalut value - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject defalut value
Date
Msg-id 199905120913.SAA04876@srapc451.sra.co.jp
Whole thread Raw
Responses Re: [HACKERS] defalut value
Re: [HACKERS] defalut value
List pgsql-hackers
Is this a known problem?

CREATE TABLE test (
plt int2 PRIMARY KEY,
state CHAR(5) NOT NULL DEFAULT 'new',
used boolean NOT NULL DEFAULT 'f',
id int4
);

INSERT INTO test (plt, id) VALUES (1, 1);
INSERT INTO test (plt, id) VALUES (2, 2);
INSERT INTO test (plt, id) VALUES (3, 3);

SELECT * FROM test;

plt|state|used|id
---+-----+----+-- 1|new  |f   | 1 2|new  |f   | 2 3|new  |f   | 3
(3 rows)

UPDATE test SET state = 'diff' WHERE plt = 1;
SELECT * FROM test;

plt|state|used|   id
---+-----+----+----- 2|new  |f   |    2 3|new  |f   |    3 1|diff |t   |26144
(3 rows)

???
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: ZEUGSWETTER Andreas IZ5
Date:
Subject: Re: [HACKERS] misc and triggers regression tests failed on 6. 5be t a1
Next
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] More on GROUP BY