From: | Jeff MacDonald <jeff(at)pgsql(dot)com> |
---|---|
To: | |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: ordbms - postgresql errata |
Date: | 2000-09-19 05:07:50 |
Message-ID: | Pine.BSF.4.21.0009190207400.766-100000@rage.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(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
>
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
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak | 2000-09-19 07:29:31 | odbc (was: Re: ascii to character conversion in postgres) |
Previous Message | Jeff MacDonald | 2000-09-19 04:45:30 | ordbms - postgresql errata |