Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread George Pavlov
> >> In the second place, the reason most of our messages don't already > >> contain schema names is that in the past we've judged it would be > >> mostly clutter; and given the infrequency of complaints I see no > >> reason to change that opinion. > > > I tend to disagree. We can run a poll in a

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Craig Ringer
George Pavlov wrote: > I > suspect lack of complaints is largely due to the (small) number of > people using namespaces -- the denominator should be users of the > feature, not all users... I certainly found it extremely frustrating that errors didn't reference the involved schema when I was wor

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Scott Marlowe
On Wed, Oct 22, 2008 at 11:13 AM, Andrus <[EMAIL PROTECTED]> wrote: >> Well, FWIW, I also would like to be able to see which schema caused the >> violation, as I'm in a similar boat of having the same table name in >> multiple schemas. > > Maybe to report schema name only if it is not public or i

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Scott Marlowe
On Wed, Oct 22, 2008 at 11:27 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: >> Tom Lane escribió: >>> In the second place, the reason most of our messages don't already >>> contain schema names is that in the past we've judged it would be >>> mostly clutter; a

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Andrus
Well, FWIW, I also would like to be able to see which schema caused the violation, as I'm in a similar boat of having the same table name in multiple schemas. Maybe to report schema name only if it is not public or if same table exists in different schemas or report it in detail message or h

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane escribió: >> In the second place, the reason most of our messages don't already >> contain schema names is that in the past we've judged it would be >> mostly clutter; and given the infrequency of complaints I see no >> reason to change that opi

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Alvaro Herrera
Tom Lane escribió: > A comprehensive response to this type of gripe wouldn't be all that > "easy". In the first place, there'd be a lot of code to touch. Well, that makes it tedious, which is not the same as hard. > In the second place, the reason most of our messages don't already > contain sc

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Ben Chobot
On Oct 22, 2008, at 6:50 AM, Tom Lane wrote: In the second place, the reason most of our messages don't already contain schema names is that in the past we've judged it would be mostly clutter; and given the infrequency of complaints I see no reason to change that opinion. Well, FWIW, I also

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Andrus
The type of fix I'd like to see would be to not change message texts at all, but to add separate error-message fields for the name and schema name of object(s) involved in an error; which would be details that psql, for example, would show only in VERBOSE mode. Note that error report fields along

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Scott Marlowe escribió: >> Actually this sounds like a TODO to me. I imagine the db knows the >> schema and it's just not reporting it in the error message. Bruce? >> Tom? > Added -- it should be easy to do, so marked as such. A comprehensive respons

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-22 Thread Alvaro Herrera
Scott Marlowe escribió: > Actually this sounds like a TODO to me. I imagine the db knows the > schema and it's just not reporting it in the error message. Bruce? > Tom? Added -- it should be easy to do, so marked as such. -- Alvaro Herrerahttp://www.CommandPromp

Re: [GENERAL] How to get schema name which violates fk constraint

2008-10-21 Thread Scott Marlowe
Actually this sounds like a TODO to me. I imagine the db knows the schema and it's just not reporting it in the error message. Bruce? Tom? On Tue, Oct 14, 2008 at 9:43 AM, Andrus <[EMAIL PROTECTED]> wrote: > FK violation erroro is displayed as > > 7/23503:ERROR: insert or update on table "summak

[GENERAL] How to get schema name which violates fk constraint

2008-10-21 Thread Andrus
FK violation erroro is displayed as 7/23503:ERROR: insert or update on table "summak" violates foreign key constraint "summak_kontonr_fkey1" Key (kontonr)=(2421 ) is not present in table "konto". I have large numbers of schemas all containing tables with same name. How to determine schem