inheritence behavior question ....
| От | |
|---|---|
| Тема | inheritence behavior question .... |
| Дата | |
| Msg-id | 003b01c1d39a$2d7f8240$6501a8c0@calvin обсуждение исходный текст |
| Ответы |
Re: inheritence behavior question ....
|
| Список | pgsql-general |
I did the following which sounds illogical to me :
<snip>
test=> create table father (col1 integer not null unique);
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'father_col1_key'
for table 'father'
CREATE
test=> create table son (col2 integer) inherits (father);
CREATE
test=> insert into father (1);
ERROR: parser: parse error at or near "1"
test=> insert into father values (1);
INSERT 19423 1
test=> insert into father values (2);
INSERT 19424 1
test=> insert into father values (3);
INSERT 19425 1
test=> insert into son values (1, 3);
INSERT 19426 1
test=> select * from father;
col1
------
1
2
3
1
(4 rows)
</snip>
Could some one explain why the last insert did not fail ?
I understand why it could work !
But I would still expect it to fail as the user requested to have the tabl
containing unique values and it obviously doesn't contain only uniques ..
Much tx,
thomas,
--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Bruxelles
yahoo-id : smetsthomas
В списке pgsql-general по дате отправления: