Re: A plan to improve error messages with context, hint - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: A plan to improve error messages with context, hint
Date
Msg-id Pine.LNX.4.58.0403050844190.821@mordor.coelho.net
Whole thread Raw
In response to Re: A plan to improve error messages with context, hint  (Dennis Bjorklund <db@zigo.dhs.org>)
List pgsql-hackers
> > (2) Does someone has any comment about these problems or
> >     the way I intend to try to address them?
>
> About the implementation idea with hints. I'm not sure will be so easy to
> implement as you suggested. Maybe if one add hints to every construct,
> and set to empty hint where it does not make sense.

Sure.

> What I'm afraid of is to get hints or advices that are plain wrong.
>   CREATE TABLE foo (bar int key);
>   HINT: table name expected
> or something.

Sure, I agree with you.

> But if it works good in practice, why not having hints.

I agree that the actual validation is whether the result looks good,
and are most of the time useful.

> stmt: CREATE TABLE ( anything ); { generate error "missing table name" }

Yes, that's an idea, but it would change the syntax definition, and
may create conflicts, so it's an harder way to do it.

-- 
Fabien Coelho - coelho@cri.ensmp.fr


pgsql-hackers by date:

Previous
From: Thomas Swan
Date:
Subject: Re: [pgsql-hackers-win32] Tablespaces
Next
From: Fabien COELHO
Date:
Subject: Re: A plan to improve error messages with context, hint