X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1B595D1B1C7 for ; Sun, 1 Aug 2004 13:07:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67495-02 for ; Sun, 1 Aug 2004 16:07:19 +0000 (GMT) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by svr1.postgresql.org (Postfix) with ESMTP id AC4D2D1B1A1 for ; Sun, 1 Aug 2004 13:07:18 -0300 (ADT) Received: from [192.168.0.5] (lns-p19-11-82-65-194-199.adsl.proxad.net [82.65.194.199]) by postfix3-1.free.fr (Postfix) with ESMTP id E262B173721 for ; Sun, 1 Aug 2004 18:07:16 +0200 (CEST) Message-ID: <410D1546.2060607@free.fr> Date: Sun, 01 Aug 2004 18:07:34 +0200 From: Patrice OLIVER User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: fr, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Need help form inherits Content-Type: multipart/mixed; boundary="------------000800030706000203030301" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.0 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, MAILTO_TO_SPAM_ADDR, RCVD_IN_SORBS X-Spam-Level: ** X-Archive-Number: 200408/1 X-Sequence-Number: 18498 This is a multi-part message in MIME format. --------------000800030706000203030301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello everybody, I would like to use inherits between 2 tables : user(login,password) and studiant(firstname, lastname, email) these tables are created like this : create table user ( login varchar(15) not null primary key, password varchar(32)); create table studiant ( firstname varchar(35), lastname varchar(35), email varchar(255) ) inherits user; The problem is that a studiant can become a user of the site to consult its results. Members of user table are actually secretaries, who administer exams ... so, if I create un user : insert into user values ('por',md5('tototo')); and I want know to say that the user 'por' becomes a studiant. How can I do this ? In the other way, to say that a studiant is also a user, I just have to do : insert into studiant ('kml',md5('tititi'),'Michel','Michelle','michelle21@dynu.com'); And all is ok. Thanks for your help. Patrice --------------000800030706000203030301 Content-Type: text/x-vcard; charset=utf-8; name="oliverp21.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="oliverp21.vcf" begin:vcard fn:Patrice OLIVER n:OLIVER;Patrice email;internet:oliverp21@free.fr x-mozilla-html:FALSE version:2.1 end:vcard --------------000800030706000203030301--