Thread: Re: [HACKERS] OSDN Database conference report (long)

Re: [HACKERS] OSDN Database conference report (long)

From
Tom Lane
Date:
"Rob S." <rslifka@home.com> writes:
>> ...  I thought this pointed up the need we've
>> been aware of for awhile to overhaul our error reporting.

> I'm not sure exactly where the error checking comes in.  I've been using
> Postgres in two places - at home (Apache/Tomcat) and at work (Apache/iASP)
> for the last 8 months or so.  The only gripe I have with error messages is
> that they could be more specific.  "Error near <some character that occurs
> 20+ times in the query>" is usually pretty useless =)  Otherwise, I can't
> recall a single time where I said, "man that message should be more clear".

The thing is that any error that the database itself issues is probably
database-centric; it may be helpful to the person coding the application,
but is unlikely to make a lot of sense to an end user.  So well-coded
apps typically want to substitute their own error messages --- say,
"please enter a positive value" rather than "rejected due to CHECK
constraint foo".  We need to provide more support for that.  A
consistent numbering scheme for error codes would help, for instance,
so that apps could just look at the error number and not be dependent
on pattern-matching against strings that the developers might reword
from time to time.

As I said, this has been on the todo list for awhile...

            regards, tom lane

Re: Re: [HACKERS] OSDN Database conference report (long)

From
Tim Uckun
Date:
At 11:08 AM 11/3/2000 -0500, Tom Lane wrote:
>"Rob S." <rslifka@home.com> writes:
> >> ...  I thought this pointed up the need we've
> >> been aware of for awhile to overhaul our error reporting.
>
> > I'm not sure exactly where the error checking comes in.  I've been using
> > Postgres in two places - at home (Apache/Tomcat) and at work (Apache/iASP)
> > for the last 8 months or so.  The only gripe I have with error messages is
> > that they could be more specific.  "Error near <some character that occurs
> > 20+ times in the query>" is usually pretty useless =)  Otherwise, I can't
> > recall a single time where I said, "man that message should be more clear".

As opposed to SQL server which tends to be extrememly cryptic and goes out
of it's way to hide information from you. Once I was importing some records
from a text file and it kept stopping in the middle with a dialog box that
said "overflow" and that's all. It would not tell me the line number or the
field it was having trouble with. What I did was to recreate the structure
of the table in postgres and try to import into there. Postgres told me
that I had an invalid date on line number whatever. I guess you cna say I
used postgres as a debugging tool for ms-sql server.

BTW did you know that it's impossible to store dates before 1700 on ms-sql
server? It's datetime datatype will not support older dates.
----------------------------------------------
              Tim Uckun
       Mobile Intelligence Unit.
----------------------------------------------
    "There are some who call me TIM?"
----------------------------------------------