pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: X X <junkmbox@yahoo.com>
To: pgsql-interfaces@postgresql.org
Subject: libpq: how to get error code (not message)
Date: Wed, 1 Dec 2004 19:11:44 -0800 (PST)
Message-ID: <20041202031144.68001.qmail@web51106.mail.yahoo.com> (raw)

Hello,

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 

http://www.postgresql.org/docs/7.4/static/errcodes-appendix.html

(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,
Serge



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail



view thread (3+ messages)  latest in thread

Message-ID: <20041202031144.68001.qmail@web51106.mail.yahoo.com>
Permalink:  ../20041202031144.68001.qmail@web51106.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041202031144.68001.qmail@web51106.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: junkmbox@yahoo.com
  Subject: Re: libpq: how to get error code (not message)
  In-Reply-To: <20041202031144.68001.qmail@web51106.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox