From: | Clark Evans <clark(dot)evans(at)manhattanproject(dot)com> |
---|---|
To: | |
Cc: | "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Using As with Inheritance? |
Date: | 1999-02-09 04:40:06 |
Message-ID: | 36BFBC26.B5229160@manhattanproject.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
I have a parallel inheritance going on,
so I was wondering if there was a way
to re-name a derived column? This would
make my design clearer.
-----------------
CREATE TABLE B
( NAME VARCHAR(10) );
CREATE TABLE C
( ... ) INHERITS(B);
CREATE TABLE X
(
A VARCHAR(10),
B VARCHAR(10),
CONSTRAINT FOREIGN KEY (B) REFERENCES B(OID)
);
CREATE TABLE Y
( B AS C, /* Syntatic Sugar */
D VARCHAR(10),
CONSTRAINT FOREIGN KEY (C) REFERENCES C(OID)
) INHERITS(X)
Here, I've added the syntax "AS" to show that
column A in table X, is called B in the
derived table Y.
Thank you for your thoughts.
:) Clark Evans
From | Date | Subject | |
---|---|---|---|
Next Message | Stéphane Dupille | 1999-02-09 08:55:23 | Re: [GENERAL] A mistake generates strange result |
Previous Message | Joel Parker Henderson | 1999-02-09 01:57:03 | How do I unsubscribe? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-02-09 06:44:15 | samekeys |
Previous Message | Bruce Momjian | 1999-02-09 03:56:18 | Optimizer fix |