Re: org.postgresql.util.PSQLException - column does not exist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wayne Oliver <wayn0(dot)ml(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: org.postgresql.util.PSQLException - column does not exist
Date: 2013-07-22 13:08:18
Message-ID: 12849.1374498498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Wayne Oliver <wayn0(dot)ml(at)gmail(dot)com> writes:
> [ query works when done by hand, not so much when done by java program ]

I'd bet good money that there's more than one table named "order_details",
some of which have an "mdn" column while others don't. Most likely the
tables are in different schemas and you get the different results
because you and the program are running with different search_path
settings. But I've seen at least one case where the person wasn't even
connecting to the same database as his program was.

You could try something like

\d *.order_details

to check for the same-table-different-schemas theory.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Luca Ferrari 2013-07-22 13:11:08 Re: org.postgresql.util.PSQLException - column does not exist
Previous Message Wayne Oliver 2013-07-22 08:50:55 org.postgresql.util.PSQLException - column does not exist