pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JiangWei <jw.pgsql@sduept.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [C API] Is there a nice way to get table/column
Date: Fri, 06 Jan 2006 10:15:19 +0800
Message-ID: <43BDD2B7.2090609@sduept.com> (raw)
In-Reply-To: <20060106021149.GA80657@winnie.fuhr.org>
References: <43BDC8B4.6020801@sduept.com>
	<20060106021149.GA80657@winnie.fuhr.org>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael Fuhr wrote:
<blockquote cite="mid20060106021149.GA80657@winnie.fuhr.org" type="cite">
  <pre wrap="">[Please post in plain text, not HTML.]

On Fri, Jan 06, 2006 at 09:32:36AM +0800, JiangWei wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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?

  </pre>
</blockquote>
No.&nbsp; I want to throw a exception with&nbsp; the column name, like this :<br>
<br>
if (sqlstate == undefined_column)<br>
&nbsp; throw UnknownProperty(column_name);<br>
<br>
<br>
</body>
</html>



view thread (3+ messages)  latest in thread

Message-ID: <43BDD2B7.2090609@sduept.com>
Permalink:  ../43BDD2B7.2090609@sduept.com/
Also on:    postgresql.org/message-id/43BDD2B7.2090609@sduept.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jw.pgsql@sduept.com, mike@fuhr.org
  Subject: Re: [C API] Is there a nice way to get table/column
  In-Reply-To: <43BDD2B7.2090609@sduept.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox