Re: Disappearing Records

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: Rory Browne <rory(dot)browne(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Terry Fielder <terry(at)ashtonwoodshomes(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Disappearing Records
Date: 2005-11-02 14:35:09
Message-ID: m23bmff78i.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rory Browne <rory(dot)browne(at)gmail(dot)com> writes:

> select u.username, g.groupname from users u, groups g where u.group_id=g.id
> (assuming users are in exactly one group)
>
> If the group_id field in the users table was corrupted, and set to a
> value that isn't in the groups table, then that view wouldn't return
> anything.

That's why foreign key constraints are good. :)

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hugo 2005-11-02 14:40:56 Postgres + CentOS
Previous Message Ian Harding 2005-11-02 14:34:50 Re: Oracle 10g Express - any danger for Postgres?