X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 60ECC52956 for ; Wed, 17 Aug 2005 08:07:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48716-02 for ; Wed, 17 Aug 2005 11:07:42 +0000 (GMT) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by svr1.postgresql.org (Postfix) with ESMTP id C2E2452AC0 for ; Wed, 17 Aug 2005 08:07:34 -0300 (ADT) Received: from amiindia.co.in (unknown [203.199.198.234]) by svr4.postgresql.org (Postfix) with ESMTP id 64C855B0202 for ; Wed, 17 Aug 2005 08:07:07 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by amiindia.co.in (8.12.10/8.12.11) with SMTP id j7H7dark032463 for ; Wed, 17 Aug 2005 13:10:32 +0530 Received: from amiindiahjwbgh (unknown [10.0.0.205])by venus.amiindia.co.in (Postfix) with ESMTPid C2A334FC062; Wed, 17 Aug 2005 13:08:50 +0530 (IST) Message-ID: <00d501c5a302$fe45da60$cd00000a@amiindiahjwbgh> From: "sandhya" To: "postgre" Cc: "sandhya" Subject: error numbers in postgresql Date: Wed, 17 Aug 2005 13:39:23 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00CB_01C5A331.13F81E80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-imss-version: 2.5 X-imss-result: Passed X-imss-scores: Clean:90.51202 C:21 M:1 S:5 R:5 X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.064 required=5 tests=[AWL=-0.014, FORGED_RCVD_HELO=0.05, HTML_60_70=0.027, HTML_MESSAGE=0.001] X-Spam-Level: X-Archive-Number: 200508/211 X-Sequence-Number: 18530 This is a multi-part message in MIME format. ------=_NextPart_000_00CB_01C5A331.13F81E80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 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,uname,.........) { //here i use postgres connection function pg_conn *conn; conninfo=3D"dbname=3Dexample(dname) user=3Dpostgres(uname)"; conn=3DPQConnectdb(conninfo) //After connecting i need to create a table..and if the table exists=20 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 ------=_NextPart_000_00CB_01C5A331.13F81E80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
  
   I want to know ,if there = is any way to=20 return  error codes/numbers as  a return value from the = postgresql=20 functions.
For ex:
 
If i am using my connection function=20 say,
DbConnect(dname,uname,.........)
{
//here i use postgres connection=20 function
pg_conn *conn;
conninfo=3D"dbname=3Dexample(dname)=20 user=3Dpostgres(uname)";
conn=3DPQConnectdb(conninfo)
//After connecting i need to create a = table..and if=20 the table exists
PQerrormessage(conn) will return error=20 message...
But what i need is ..
Is there any other way of returning = error number to=20 my main program.
Can you please tell me how to handle = these errors=20 in my application.
I referred posgresql site..I didn't get = any clear=20 idea of it.
Any help please......
 
Thank you...
Regards,
Sandhya R
 
 
------=_NextPart_000_00CB_01C5A331.13F81E80--