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 / -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers