Michael Fuhr wrote:
[Please post in plain text, not HTML.]

On Fri, Jan 06, 2006 at 09:32:36AM +0800, JiangWei wrote:
  
42703 UNDEFINED COLUMN   undefined_column
42883 UNDEFINED FUNCTION undefined_function
42P01 UNDEFINED TABLE    undefined_table

I want to know which column undefined when "undefined_column" Happen
at run time.
    

With libpq you can call PQerrorMessage(), PQresultErrorMessage(),
or PQresultErrorField() to get a string that should identify the
offending column, function, table, etc.  Will that work for your
purpose?

  
No.  I want to throw a exception with  the column name, like this :

if (sqlstate == undefined_column)
  throw UnknownProperty(column_name);