From: anil <anil@server.awcoldstream.com>
To: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: Inheritance
Date: Sat, 21 Nov 1998 00:21:46 -0600
Message-ID: <36565BF9.10873260@awcoldstream.com> (raw)
Hi All,
I have a fields for customer:
cusId int4 - customer ID Unique number
cusName text - Customer Name
cusPrice int4 - Customer pricing scheme
cusAdd text - Customer Address
cusCity text - customer city
cusProv text - Customer city
cusZip text - Customer zip
I am using first three fields on a order window lot and I use all fields
on the customer information Window.
if i create two tables::
table scustomer -> (cusid int4 primary key, cusName text, cus
cusPrice)
lcustomer -> (cusAdd text , cusCity text, cusProv text
,cusZip text ) inherits (scustomer)
so I could use
select cusId,cusName,cusPrice from lcustomer;
or
select * from from scustomer*;
which query is going to faser???? or is there anyway that I insert some
rows into lcustomer table and get result on corrosponding fields on
scustomer table??
I have tried this:
insert into lcustomer(1234,'My
customer',10,'Myaddress',Mycity','Myprov','Myzip');
select * from lcustomer;
1234 | My customer | 10 | Myaddress | Mycity
| Myprov | Myzip
select * from scustomer;
zero rows;
select * from scustomer*;
1234 | My customer | 10
what do you mean by - Append (cost=0.0 size=0 width=0) on the out put of
explain select * from scustomer*;
Thank you
Anil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: anil@server.awcoldstream.com
Subject: Re: Inheritance
In-Reply-To: <36565BF9.10873260@awcoldstream.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox