Re: [SQL] getting details about integrity constraint violation

2005-06-14 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> Simply name the table constraints yourself with a descriptive name, so you >> always know exactly what is going on: > And then I keep a list of all the constraint names and scan the error > message for it? Don't keep a list: just come up with a

Re: [SQL] getting details about integrity constraint violation

2005-06-13 Thread Markus Bertheau
Dnia 14-06-2005, wto o godzinie 03:39 +, Greg Sabino Mullane napisał(a): > Simply name the table constraints yourself with a descriptive name, so you > always know exactly what is going on: And then I keep a list of all the constraint names and scan the error message for it? Markus -- Marku

Re: [SQL] getting details about integrity constraint violation

2005-06-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Markus Bertheau asked: > how would I find out details about for example what constraint was > violated by an insert statement? The SQL state tells me, that a unique > constraint was violated, but it doesn't say which one. Simply name the table const

Re: [SQL] getting details about integrity constraint violation

2005-06-03 Thread PFC
The "error fields" facility in the FE/BE protocol could be extended in that direction, and I think there's already been some discussion about it; but no one has stepped up with a concrete proposal, much less volunteered to do the work ... Um, if changing the protocol is a bother, you could al

Re: [SQL] getting details about integrity constraint violation

2005-06-03 Thread Markus Bertheau ☭
В Птн, 03/06/2005 в 10:00 +0200, KÖPFERL Robert пишет: > | > |You can't, at the moment, except by parsing the text message. > | > |The "error fields" facility in the FE/BE protocol could be extended > |in that direction, and I think there's already been some discussion > |about it; but no one has s

Re: [SQL] getting details about integrity constraint violation

2005-06-03 Thread KÖPFERL Robert
| |You can't, at the moment, except by parsing the text message. | |The "error fields" facility in the FE/BE protocol could be extended |in that direction, and I think there's already been some discussion |about it; but no one has stepped up with a concrete proposal, much |less volunteered to do t

Re: [SQL] getting details about integrity constraint violation

2005-06-02 Thread Tom Lane
Markus Bertheau <[EMAIL PROTECTED]> writes: > how would I find out details about for example what constraint was > violated by an insert statement? You can't, at the moment, except by parsing the text message. The "error fields" facility in the FE/BE protocol could be extended in that direction,

[SQL] getting details about integrity constraint violation

2005-06-02 Thread Markus Bertheau
Hi, how would I find out details about for example what constraint was violated by an insert statement? The SQL state tells me, that a unique constraint was violated, but it doesn't say which one. I cannot sensibly react to such errors if I don't know what exactly happened. I'd like to avoid pars