ordbms - postgresql errata

From: Jeff MacDonald <jeff(at)pgsql(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ordbms - postgresql errata
Date: 2000-09-19 04:45:30
Message-ID: Pine.BSF.4.21.0009190139160.766-100000@rage.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

i just found a (few) caveat already..

1:

bignose=# create table people(
bignose(# name varchar(64),
bignose(# age int8,
bignose(# sin int4,
bignose(# id serial);

bignose=# create table soldier(
bignose(# rank varchar(32),
bignose(# post varchar(32)) inherits (people);

bignose=# alter table people add column gender int2;
ALTER
bignose=# \d soldier
Table "soldier"
Attribute | Type | Modifier
-----------+-------------+-------------------------------------------------
name | varchar(64) |
age | bigint |
sin | integer |
id | integer | not null default nextval('people_id_seq'::text)
rank | varchar(32) |
post | varchar(32) |

now you can see that the attribute was added to the super class
but the sub class didn't inhereit..

----------- NEXT -------------

bignose=# insert into soldier (name,age,sin) values
bignose-# ('fred',19,12321);

bignose=# select p.* from people* p;
name | age | sin | id | gender
------+-----+-------+----+--------
fred | 19 | 12321 | 1 | -16968

i didn't specify a gender, but it put in a "randomish" value..
shouldn't it have just left this untouched ?

Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc | Hub.Org Networking Services
jeff(at)pgsql(dot)com | jeff(at)hub(dot)org
www.pgsql.com | www.hub.org
1-902-542-0713 | 1-902-542-3657
-----------------------------------------------------
Fascimile : 1 902 542 5386
IRC Nick : bignose

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff MacDonald 2000-09-19 05:07:50 Re: ordbms - postgresql errata
Previous Message Jeff MacDonald 2000-09-19 04:35:42 ordbms - postgresql errata