From: | JiangWei <jw(dot)pgsql(at)sduept(dot)com> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [C API] Is there a nice way to get table/column |
Date: | 2006-01-06 02:15:19 |
Message-ID: | 43BDD2B7.2090609@sduept.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
<!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(dot)GA80657(at)winnie(dot)fuhr(dot)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. I want to throw a exception with the column name, like this :<br>
<br>
if (sqlstate == undefined_column)<br>
throw UnknownProperty(column_name);<br>
<br>
<br>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-01-06 04:01:58 | Re: [C API] Is there a nice way to get table/column name on some error ? |
Previous Message | Michael Fuhr | 2006-01-06 02:11:49 | Re: [C API] Is there a nice way to get table/column name on some error ? |