From: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> |
---|---|
To: | Curt Sampson <cjs(at)cynic(dot)net> |
Cc: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem between inheritance and references |
Date: | 2002-07-24 12:14:05 |
Message-ID: | 20020724121405.GA10412@nic.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 24, 2002 at 11:11:25AM +0900,
Curt Sampson <cjs(at)cynic(dot)net> wrote
a message of 12 lines which said:
> > OK, I see the problem. Any suggestion on how to rephrase my schema
> > (besides dropping inheritance)?
>
> What would be the disadvantage of dropping inheritance, and just
> using standard relational methods (foreign key, join, etc.)?
It's less beautiful :-( Anyway, here is my new schema, which seems to work:
CREATE TABLE Authentication (
id SERIAL,
method TEXT NOT NULL CHECK (method IN ('GPG', 'X509', 'password')),
password TEXT,
gpgpubkey TEXT,
certificate TEXT,
CHECK (password IS NOT NULL OR gpgpubkey IS NOT NULL OR certificate IS NOT NULL));
CREATE TABLE Users (
id SERIAL,
name TEXT UNIQUE NOT NULL,
auth_info INTEGER REFERENCES Authentication (id));
From | Date | Subject | |
---|---|---|---|
Next Message | Stephane Bortzmeyer | 2002-07-24 12:15:30 | Re: Problem between inheritance and references |
Previous Message | Elielson Fontanezi | 2002-07-24 11:30:53 | Postgres enviroment variable |