Error details in sql (and plpgsql) (possible feature request)

From: Wim Bertels <wim(dot)bertels(at)khleuven(dot)be>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Error details in sql (and plpgsql) (possible feature request)
Date: 2011-06-22 08:38:39
Message-ID: 1308731919.3732.10.camel@zwerfkat
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hallo,

Using libpqexec many error details can retrieved:
http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html
(such as PG_DIAG_SEVERITY, PG_DIAG_MESSAGE_HINT,
PG_DIAG_STATEMENT_POSITION.. as on the site above)
eg:
http://pgsql.privatepaste.com/656698b511

but when u try to trap/catch all these errors,
this doesnt seem possible from withing plpgsql,
where we only have SQLSTATE and SQLERRM
eg.
http://www.postgresql.org/docs/current/interactive/plpgsql-control-structures.html
http://pgsql.privatepaste.com/3b71488e8a

So i think it would be interesting to be able to access the other error
details as given by libpg-exec as well.
Eg adding SEVERITY, MESSAGE_HINT, STATEMENT_POSITION, ..
where we now only have SQLSTATE and SQLERRM

mvg,
Wim

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Szymon Guz 2011-06-22 08:38:58 data compression in protocol?
Previous Message Emanuel Calvo 2011-06-22 08:28:51 Where is pg_create_restore_point funciton in 9.1a2 ?