defalut value

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: hackers(at)postgresql(dot)org
Subject: defalut value
Date: 1999-05-12 09:13:26
Message-ID: 199905120913.SAA04876@srapc451.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-05-12 10:22:03 Re: [HACKERS] More on GROUP BY
Previous Message ZEUGSWETTER Andreas IZ5 1999-05-12 08:50:07 Re: [HACKERS] misc and triggers regression tests failed on 6. 5be t a1