[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: [GENERAL] Unique indices and inheritance
From: Bruce Guenter <bguenter-pgsql-general () qcc ! sk ! ca>
Date: 1999-03-26 6:16:56
[Download RAW message or body]
Greetings.
In the following situation:
create table foo (id int4);
create table bar (val int4) inherits(foo);
Is it possible to create a unique index such that no record in either
foo or bar (in other words, in foo*) has a duplicated id? I tried what
seemed to be most obvious to me by doing:
create unique index foo_pkey on foo*(id);
but it caused a syntax error. Creating a unique index on just foo
allows duplicates between the two tables.
--
Bruce Guenter, QCC Communications Corp. EMail: bruce.guenter@qcc.sk.ca
Phone: (306)249-0220 WWW: http://www.qcc.sk.ca/~bguenter/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic