From: | "Ville Jungman" <ville_jungman(at)hotmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Reference to multiple cols |
Date: | 2003-01-11 15:18:25 |
Message-ID: | F67EA2VqFnW0kKIBXEH000002bb@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi!
I want to make a table with a column that references to multiple tables. Is
that possible? Look at the 3rd row:
1. create table dog(barking_volume int,slobber_amount int);
2. create table cat(laziness int);
3. create table animals(name text,ref_animal oid references cat(oid) and
dog(oid) );
---
I want to use references to ensure that i can not delete a row from dog or
cat tables if it is referenced from animals-table.
---
Also I could reference straight to the general oid-value but I think it
isn't possible either - like:
create table animals(name text,ref_animal oid references <alltables>.oid);
---
i and my cat Naukki (laziness == 98) will be glad for any help.
ville jungman, ulvilantie 3 b 11, 00350 helsinki, finland
tel. + 358 - 9 - 225 4482 , http://www.kolumbus.fi/vilmak
usko Herraan Jeesukseen, niin sin pelastut. (apt. 16:31)
_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=features/junkmail
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Owen | 2003-01-11 16:34:46 | descending indexes |
Previous Message | Reshat Sabiq | 2003-01-11 03:30:49 | Unicode |