Home > Archive > PostgreSQL Administration > August 2005 > error numbers in postgresql









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author error numbers in postgresql
sandhya

2005-08-17, 9:30 am

Hi,

I want to know ,if there is any way to return error codes/numbers as a return value from the postgresql functions.
For ex:

If i am using my connection function say,
DbConnect(dname,unam
e,.........)
{
//here i use postgres connection function
pg_conn *conn;
conninfo=" dbname=example(dname
) user=postgres(uname)
";
conn=PQConnectdb(con
ninfo)
//After connecting i need to create a table..and if the table exists
PQerrormessage(conn)
will return error message...
But what i need is ..
Is there any other way of returning error number to my main program.
Can you please tell me how to handle these errors in my application.
I referred posgresql site..I didn't get any clear idea of it.
Any help please......

Thank you...
Regards,
Sandhya R


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com