From: | Adam(dot)Bukla(at)interia(dot)pl (Adam Bukla) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problem with API (libpq) - detailed error codes |
Date: | 2004-01-30 15:17:52 |
Message-ID: | d07b23e8.0401300717.5ebb53b1@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi!
I started programming PostgreSQL database with libpq API (client
side). It looks very easy, but unexpected I found problem, which I
cannot solve myself.
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).
For instance, if I create table, I would like to know, that operation
failed because:
- table already exist
- sql syntax error
- invalid columnt type
and so on.
I searched documents about libpq API and even header file
'internal/libpq-int.h' but I didn't found any interesting.
I would be very gracefully for any hint.
Best regards,
Adam Bukla
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2004-01-30 16:05:24 | Re: I can't upgrade to PostgreSQL 7.4 in RedHat 9.0 |
Previous Message | Steve Atkins | 2004-01-30 14:11:41 | Re: Specifying many rows in a table |