Re: ordbms - postgresql errata - Mailing list pgsql-hackers

From Jeff MacDonald
Subject Re: ordbms - postgresql errata
Date
Msg-id Pine.BSF.4.21.0009190207400.766-100000@rage.hub.org
Whole thread Raw
In response to ordbms - postgresql errata  (Jeff MacDonald <jeff@pgsql.com>)
List pgsql-hackers
it would appear my first mail didn't go thru

the basic gist was, 

can anyone point out any caveats/pitfalls to the
postgresql inheritance functions..


On Tue, 19 Sep 2000, Jeff MacDonald wrote:

> 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@pgsql.com        | jeff@hub.org
> www.pgsql.com        | www.hub.org
> 1-902-542-0713        | 1-902-542-3657
> -----------------------------------------------------
> Fascimile : 1 902 542 5386
> IRC Nick  : bignose
> 

Jeff MacDonald,

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



pgsql-hackers by date:

Previous
From: Jeff MacDonald
Date:
Subject: ordbms - postgresql errata
Next
From: Alex Guryanow
Date:
Subject: char* to Datum conversion