From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: the case for machine-readable error fields |
Date: | 2009-08-05 11:29:13 |
Message-ID: | 162867790908050429x734c7da0xfb32162fac53d088@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> What are people doing with parsing error messages for "column names for
> datatype mismatches"? I can't imagine any of my code being able to do
> anything sensible in such a case. If it's things like people giving
> dates to the database in an incorrect format then that's what they get
> for not doing input validation isn't it?
>
When you have a full set of constraint, then you don't need to
validate input. Just you will execute statement. When execution is
correct, then all is ok, when not, then you have to recheck message,
err code, ... and you have to verify, so some exception is expected or
not. This is programming based on exceptions. Some better structured
information helps. And what's more - this should be in conformity with
ANSI SQL.
regards
Pavel Stehule
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2009-08-05 11:44:06 | Adding error message "source" |
Previous Message | Andrew Dunstan | 2009-08-05 11:20:05 | Re: machine-readable explain output v4 |