From: Patrice OLIVER <oliverp21@free.fr>
To: pgsql-sql@postgresql.org
Subject: Need help form inherits
Date: Sun, 01 Aug 2004 18:07:34 +0200
Message-ID: <410D1546.2060607@free.fr> (raw)
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
Attachments:oliverp21.vcf (text/x-vcard, 122B) download
begin:vcard
fn:Patrice OLIVER
n:OLIVER;Patrice
email;internet:oliverp21@free.fr
x-mozilla-html:FALSE
version:2.1
end:vcard
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: oliverp21@free.fr
Subject: Re: Need help form inherits
In-Reply-To: <410D1546.2060607@free.fr>
* 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