Re: Problem with API (libpq) - detailed error codes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam(dot)Bukla(at)interia(dot)pl (Adam Bukla)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with API (libpq) - detailed error codes
Date: 2004-02-01 00:18:01
Message-ID: 9557.1075594681@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adam(dot)Bukla(at)interia(dot)pl (Adam Bukla) writes:
> If function PQexec fails, I can get error code using PQresultStatus.
> But returned codes are very generally and do not specify what really
> happen. I can get detailed error description using PQerrorMessage
> function, but I need detailed error code (number).

Beginning in Postgres 7.4, there are standard SQLSTATE error codes
available (see PQresultErrorField), but older releases do not have them.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Culley Harrelson 2004-02-01 00:51:03 Re: Unicode vs SQL_ASCII DBs
Previous Message Manuel Tejada 2004-02-01 00:01:53 Re: PostgreSQL 7.4.1 and pgdb.py