GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PQgeterror(3) libpqtypes Manual PQgeterror(3)

PQgeterror, PQseterror, PQgetErrorField - libpqtypes error system management functions

#include <libpqtypes.h>

char *PQgeterror(void);
void PQseterror(const char *format, ...);
char *PQgetErrorField(int fieldcode);

The libpqtypes library maintains a per-thread global error message. The error message is managed by PQgeterror() and PQseterror().

PQseterror() takes a regular printf compatible format string for setting the libpqtypes error message.

PQgetErrorField() gets an error field from the last executed query. The error field is only set by PQparamExec and PQparamExecPrepared. When using libpq functions that return results, like PQexec, continue to use PQresultErrorField.

To clear the libpqtypes error message, call PQseterror() with a NULL format string: PQseterror(NULL); This will also clear error fields.

PQgeterror() returns the last error message for the calling thread. It will never return NULL.

PQgetErrorField() returns the error field, referenced by fieldcode, for the last executed query. NULL is returned if no value exists.

None.

A contribution of eSilo, LLC. for the PostgreSQL Database Management System. Written by Andrew Chernow and Merlin Moncure.

Report bugs to <libpqtypes@esilo.com>.

Copyright (c) 2011 eSilo, LLC. All rights reserved.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pqt-specs(3)
2011 libpqtypes

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.