Re: Disappearing Records - Mailing list pgsql-general

From Rory Browne
Subject Re: Disappearing Records
Date
Msg-id fa07888a0511011459x1f19802dk2fe980d2a259c484@mail.gmail.com
Whole thread Raw
In response to Re: Disappearing Records  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Disappearing Records  (Douglas McNaught <doug@mcnaught.org>)
List pgsql-general
Thanks guys for your suggestions, but the problem turned out to be my
lack of experience(with PostgreSQL), combined with a bug in our PHP
Code.

Coming from a MySQL background, I assumed that if you "select x from
y", then y would be the name of a table. It turned out that in the
case that y was actually a view. It has a complex defination, but for
explanitory sake, lets say it was defined as:

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.

Something like that(except that our view wasn't quite as simple) happened to me.

pgsql-general by date:

Previous
From: "Mike Shelton"
Date:
Subject: Backend connection pooling memleak
Next
From: Jon Lapham
Date:
Subject: md5 hash on table row