Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E0DF44762B0 for ; Tue, 7 Jan 2003 07:21:34 -0500 (EST) Received: from mailhub1.sghms.ac.uk (firewall.sghms.ac.uk [194.82.50.2]) by postgresql.org (Postfix) with ESMTP id 58F51475F25 for ; Tue, 7 Jan 2003 07:21:34 -0500 (EST) Received: from [194.82.51.24] (helo=imail) by mailhub1.sghms.ac.uk with esmtp (Exim 4.05) id 18Vsjr-00058y-00; Tue, 07 Jan 2003 12:21:47 +0000 Received: from [172.16.20.3] (mrc1-003.sghms.ac.uk [172.16.20.3]) by imail.sghms.ac.uk (iPlanet Messaging Server 5.1 HotFix 0.7 (built May 7 2002)) with ESMTPA id <0H8C00I0PFNJSX@imail.sghms.ac.uk>; Tue, 07 Jan 2003 12:21:20 +0000 (GMT) Date: Tue, 07 Jan 2003 12:21:39 +0000 From: Adam Witney In-reply-to: <20030107100920.7fdcde1d.njunior@univates.br> To: njunior@univates.br Cc: pgsql-sql Message-id: MIME-version: 1.0 User-Agent: Microsoft-Entourage/10.1.1.2418 Subject: Re: Inherancing Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Status: No, hits=-101.0 required=5.7 tests=IN_REP_TO,MIME_LONG_LINE_QP,QUOTED_EMAIL_TEXT, SPAM_PHRASE_03_05,USER_AGENT,USER_AGENT_ENTOURAGE, USER_IN_WHITELIST version=2.43 X-Spam-Level: X-MailScanner-MH1: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/56 X-Sequence-Number: 10921 Yes, if you do=20 insert into cities values (1, 'Lajeado'); insert into centers values (1, 'Lajeado', 'AZ'); Then select * from cities will give you 1 Lajedo 1 Lajedo And select * from centers will give 1 Lajedo AZ However, if rather than duplicating the insert and just doing insert into centers values (1, 'Lajeado', 'AZ'); Then select * from cities will give you 1 Lajedo And select * from centers will give 1 Lajedo AZ Is this what you want? adam > In this case, when i do > select * from cities; > i'll have two tuples with the name 'Lajeado'. >=20 > Does it the only way i have ? >=20 > Thanks again, >=20 > Nasair J=FAnior da Silva > Lajeado - RS - Brasil. >=20 > Em Tue, 07 Jan 2003 12:02:13 +0000, Adam Witney > escreveu: >> On 7/1/03 11:42 am, "Nasair Junior da Silva" wrote: >>=20 >>> Hi people, >>> supposing i have the tables : >>>=20 >>> create table cities (id int, name varchar, primary key(id) ); >>> create table centers (state varchar(2)) inherits (cities); >>>=20 >>> ant the tuple >>> insert into cities values (1, 'Lajeado'); >>>=20 >>> How i do if i want to make this city as a center ? >>=20 >> If I understand you correctly you probably want to do this instead... >>=20 >> insert into centers values (1, 'Lajeado', 'AZ'); >>=20 >> Where AZ is your state >>=20 >> HTH >>=20 >> adam >>=20 >>=20 >=20 >=20 > xx=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3Dxx > || =B0v=B0 Nasair Junior da Silva || > || /(_)\ Linux User: 246054 || > || ^ ^ njunior@univates.br || > ||CPD - Desenvolvimento || > ||Univates - Centro Universit=E1rio|| > xx=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3Dxx >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) --=20 This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.