Re: Policy on schema-qualified names - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Policy on schema-qualified names
Date
Msg-id 5533.1138733202@sss.pgh.pa.us
Whole thread Raw
In response to Re: Policy on schema-qualified names  (Joachim Wieland <joe@mcknight.de>)
Responses Re: Policy on schema-qualified names  (Joachim Wieland <joe@mcknight.de>)
List pgsql-hackers
Joachim Wieland <joe@mcknight.de> writes:
> Making assumptions on the length of an error message seems to be moot
> anyway, since you don't know the length of the names of user defined objects
> in advance, nor do you know the length of the translated message strings in
> different languages.

It's certainly all pretty fuzzy, but adding an additional name to an
error message has to be seen as a significant increase in the message
length.  The worst cases are for things like foreign-key messages, where
you'd be putting *two* additional identifiers into the message.

I think the precision argument is misguided.  The direction that we
ought to be going in is to add separate fields to error reports that
contain just the names of the relevant objects (without any other
decoration).  This is needed anyway to allow client-side programs to
extract the information without having to parse human-readable text
messages ... and IIRC it's required by some part of the SQL spec, too.
I imagine such fields wouldn't be shown at default verbosity, but you
could look at them if you needed to find out which schema a referenced
object belonged to.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joachim Wieland
Date:
Subject: Re: Policy on schema-qualified names
Next
From: "Jim C. Nasby"
Date:
Subject: Re: New project launched : PostgreSQL GUI Installer for