Re: Inherancing

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: njunior(at)univates(dot)br, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Inherancing
Date: 2003-01-07 12:02:13
Message-ID: BA407245.EB7C%a.witney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 7/1/03 11:42 am, "Nasair Junior da Silva" <njunior(at)univates(dot)br> wrote:

> Hi people,
> supposing i have the tables :
>
> create table cities (id int, name varchar, primary key(id) );
> create table centers (state varchar(2)) inherits (cities);
>
> ant the tuple
> insert into cities values (1, 'Lajeado');
>
> How i do if i want to make this city as a center ?

If I understand you correctly you probably want to do this instead...

insert into centers values (1, 'Lajeado', 'AZ');

Where AZ is your state

HTH

adam

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

In response to

  • Inherancing at 2003-01-07 11:42:25 from Nasair Junior da Silva

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Nasair Junior da Silva 2003-01-07 12:09:20 Re: Inherancing
Previous Message Tomasz Myrta 2003-01-07 12:00:12 Re: [SQL] 7.3.1 index use / performance