Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> Here is the output from running your three test queries on both dbs. The
> last two return more than one row on both machines, and the last one
> returns twice the number of error messages on the test db than on the
> live db.
You know, this could be a matter of a data discrepancy, like you somehow
loaded two copies of data into some table. It'd be worth doing a
"select count(*)" on each table in each database to see if they agree.
regards, tom lane