Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-general by date

Next:From: Culley HarrelsonDate: 2004-02-01 00:51:03
Subject: Re: Unicode vs SQL_ASCII DBs
Previous:From: Manuel TejadaDate: 2004-02-01 00:01:53
Subject: Re: PostgreSQL 7.4.1 and

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group