pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedReferential integrity: broken rule?
2+ messages / 2 participants
[nested] [flat]
* Referential integrity: broken rule?
@ 2000-10-11 19:18 Franz J Fortuny <ffortuny@ivsol.com>
2000-10-11 22:15 ` Re: Referential integrity: broken rule? Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 1 reply; 2+ messages in thread
From: Franz J Fortuny @ 2000-10-11 19:18 UTC (permalink / raw)
To: pgsql-sql
This table:
create table things
(
idthing integer not null,
isthis boolean not null
primary key(idthing,isthis)
....
)
would be referenced by this one:
create table forthings
(
fromthing integer not null references things(idthing),
....
)
The above SHOULD NOT be accepted, since table "things" did not declare
idthing as UNIQUE. However, it IS accepted under PostgreSQL (7.0.2).
Am I wrong?
Best regards,
F J Fortuny
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Referential integrity: broken rule?
2000-10-11 19:18 Referential integrity: broken rule? Franz J Fortuny <ffortuny@ivsol.com>
@ 2000-10-11 22:15 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 0 replies; 2+ messages in thread
From: Stephan Szabo @ 2000-10-11 22:15 UTC (permalink / raw)
To: Franz J Fortuny <ffortuny@ivsol.com>; +Cc: pgsql-sql
Yes, I believe it is mentioned in the docs (well at least the
sgml source, I don't have a compiled doc set) as a bug
of the implementation somewhere in the section on references.
7.1 should fail for this case, although it doesn't properly deal with
dropping the unique constraint later.
Stephan Szabo
sszabo@bigpanda.com
On Wed, 11 Oct 2000, Franz J Fortuny wrote:
> This table:
>
> create table things
> (
> idthing integer not null,
> isthis boolean not null
> primary key(idthing,isthis)
> ....
>
> )
>
> would be referenced by this one:
>
> create table forthings
> (
> fromthing integer not null references things(idthing),
>
> ....
>
> )
>
> The above SHOULD NOT be accepted, since table "things" did not declare
> idthing as UNIQUE. However, it IS accepted under PostgreSQL (7.0.2).
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-10-11 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-11 19:18 Referential integrity: broken rule? Franz J Fortuny <ffortuny@ivsol.com>
2000-10-11 22:15 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
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