From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: the case for machine-readable error fields |
Date: | 2009-08-06 16:34:52 |
Message-ID: | 20090806163452.GV5407@samason.me.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 06, 2009 at 11:41:55AM +0200, Pavel Stehule wrote:
> typically in SQL/PSM (stored procedures - look on GET DIAGNOSTICS
> statement in plpgsql doc), maybe in ecpg. Other's environments raise
> exception - so you can get some data from exception or from special
> structures related to environment - php, ruby, .NET etc
Sorry, I should have said that I saw how it was used in stored
procedures. My interest was in getting the client doing something
interesting, if you've already got the complexity of a stored procedure
it shouldn't be to hard to teach it where the problem is.
One thing I didn't see any comment on was on the fact that I think
CREATE UNIQUE INDEX is really creating a constraint--it's just not
showing up as one. For the constraint name to be sent back in the case
of an error I think this needs to be changed.
Triggers (and other domain specific code) seem less important here as
they can always fail with whatever error is appropriate.
--
Sam http://samason.me.uk /
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2009-08-06 16:37:58 | Re: dblink bulk operations |
Previous Message | Andrew Dunstan | 2009-08-06 16:28:15 | Re: dblink bulk operations |