Search Postgresql Archives

Re: Disappearing Records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <m23bmff78i.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Douglas McNaught <doug@xxxxxxxxxxxx> writes:

> Rory Browne <rory.browne@xxxxxxxxx> 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.  :)

Well, Rory already confessed that he came from a MySQL background :-)


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux