Re: org.postgresql.util.PSQLException - column does not exist - Mailing list pgsql-novice

From Tom Lane
Subject Re: org.postgresql.util.PSQLException - column does not exist
Date
Msg-id 12849.1374498498@sss.pgh.pa.us
Whole thread Raw
In response to org.postgresql.util.PSQLException - column does not exist  (Wayne Oliver <wayn0.ml@gmail.com>)
List pgsql-novice
Wayne Oliver <wayn0.ml@gmail.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


pgsql-novice by date:

Previous
From: Wayne Oliver
Date:
Subject: org.postgresql.util.PSQLException - column does not exist
Next
From: Luca Ferrari
Date:
Subject: Re: org.postgresql.util.PSQLException - column does not exist