Thread: Insert into when the type is an other table

Insert into when the type is an other table

From
"Mourad EL HADJ MIMOUNE"
Date:
Hi,
 
I created a Tables : Create Table address (contry varchar(20), city varchar(20), zip_code integer),
                           
                              Create Table  person (Name  varchar(20), addr address);
 
I would know how I can Insert Values in person table.
 
note that Postgres add each created table in pg_types catalog table. so, each table is considered as a data type. is this right?
 
thanks for your help,
 
Mourad 
 
 

Re: Insert into when the type is an other table

From
will trillich
Date:
On Mon, Mar 19, 2001 at 02:44:38PM +0100, Mourad EL HADJ MIMOUNE
wrote:
> Hi,
>
> I created a Table:
>
> Create Table address (contry varchar(20), city varchar(20),
> zip_code integer),
>
> Create Table  person (Name varchar(20), addr address);

see the INHERITANCE feature in the .../postgresql-doc/html/ stuff
(either in /usr/share/doc or /usr/doc) under TUTORIAL ->
ADVANCED.

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
        -- Isaac Asimov, 'The Genetic Code'

will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!