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

libpq: how to get error code (not message)

From: X X <junkmbox(at)yahoo(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq: how to get error code (not message)
Date: 2004-12-02 03:11:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

I'm writing a client in C++ using the C-library
(libpq) interface to PostgreSQL server.

I would like to know what function to call to obtain
one of the codes listed at

(I'm aware from other postings that in JDBC it would
be a getSQLState() call, but what if I have to code
the client in C/C++ and use libpq ?)

I found that the error codes are defined in file
errcodes.h under the /server include directory, but
can't find the client-side function that returns them.

Any hints are much appreciated,

Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses.


pgsql-interfaces by date

Next:From: Michael FuhrDate: 2004-12-02 06:06:48
Subject: Re: libpq: how to get error code (not message)
Previous:From: Mike AuburyDate: 2004-12-01 09:09:05
Subject: Re: Aubit 4GL for postgresql

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