Get the last sql error - Mailing list pgsql-novice

From Erik Ande
Subject Get the last sql error
Date
Msg-id 30DD52113B959D4084A5E9DDE555C93E143542@SC-W2K8-EXCH.mpsc.intern
Whole thread Raw
Responses Re: Get the last sql error  (Bartosz Dmytrak <bdmytrak@gmail.com>)
List pgsql-novice

Dear all,

 

I'm trying to find a way to get the last

sql error which happened on a database.

Found that the last command could be retrieved with

"select current_query(); ". Is there a simple way to get

the last error code (something like select @@error in MS Sql Server)?

Any hint is appreciated. Thank you in advance.

 

Best regards

 

Erik Ande

G. Muth Partners GmbH

 

Borsigstrasse 32

D-65205 Wiesbaden

HRB 10196 Amtsgericht Wiesbaden

Geschäftsführer: Klaus Gockel

 

Tel       +49 (0)6122 5981-64

Fax      +49 (0)6122 5981-50

Mobil  +49 (0)171 3818912

 

Mail: Erik.Ande@MuthPartners.de

Internet: http://www.MuthPartners.de

 

pgsql-novice by date:

Previous
From: Christian Lawrence
Date:
Subject: Re: permissions, exclusive row locks, and delete
Next
From: Toni Alfirević
Date:
Subject: DB design advice