From: | Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <neilc(at)samurai(dot)com> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Implementation of SQLCODE and SQLERRM variables for |
Date: | 2005-03-08 09:18:36 |
Message-ID: | Pine.LNX.4.44.0503081003370.13222-400000@kix.fsv.cvut.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Hello,
I changed code by your and Neil's notes. The name SQLCODE isn't well,
better is SQLSTATE. It's very similar DB2 variable. I am not sure, so my
solutions is best. Propably not. It's only particular solution for
plpgsql. The files plpgsql.sql and plpgsql.out are diffs for regression
tests.
This patch is implementation of variables SQLERRM and SQLSTATE for plpgsql
language. Variable SQLSTATE contains five chars PostgreSQL Error Code,
SQLERRM contains relevant message last catched exception. All variables
are attached to plpgsql_block and have local scope. Default values are
'00000' for SQLSTATE and 'Sucessful completion' for SQLERRM.
Regards
Pavel Stehule
Attachment | Content-Type | Size |
---|---|---|
plpgsql.sql | text/plain | 955 bytes |
plpgsql.out | text/plain | 577 bytes |
sqlstate.diff | text/plain | 5.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2005-03-08 10:04:17 | Re: A bad plan |
Previous Message | Christopher Kings-Lynne | 2005-03-08 08:32:57 | Re: Best practices: MERGE |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-08 14:55:56 | Re: Display Pg buffer cache (WIP) |
Previous Message | Christopher Kings-Lynne | 2005-03-08 08:32:57 | Re: Best practices: MERGE |