Re: Reg : Error Handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 20, 2005 at 10:30:36AM +0530, sandhya wrote:
> I am able to get the error code as a return value from the function using,
> return (PQresultErrorField(res,PG_DIAG_SQLSTATE));
> Problem is i don't know how to generalize the messages once i get
> this....Pls any one help me in this regard

The "PostgreSQL Error Codes" appendix to the documentation explains
what each SQLSTATE code means:

http://www.postgresql.org/docs/8.0/interactive/errcodes-appendix.html

See also server/utils/errcodes.h.  I haven't found anywhere in the
source code that provides mappings from SQLSTATE to generic messages,
so you'll probably have to do that yourself.

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux