Re: BUG #16726: Invalid input syntax is not a useful error message

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: nozdrum(at)gmx(dot)de, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16726: Invalid input syntax is not a useful error message
Date: 2020-11-19 00:19:28
Message-ID: CAKFQuwb2iETtDyFfgsA37sep9A04haxGvEZ-+tJgFfFQeBTGfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Nov 18, 2020 at 5:04 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 16726
> Logged by: No useful error message
> Email address: nozdrum(at)gmx(dot)de
> PostgreSQL version: 13.0
> Operating system: Linux
> Description:
>
>
> `ERROR: invalid input syntax for type uuid:
> "dec3d6c4-c32e-45c6-1eae3df44fbf"`
>
>
I'm not sure why "specifically a group of 8 digits followed by three groups
of 4 digits followed by a group of 12 digits" is confusing: but your
attempts only have two groups of 4 digits, not three as the documentation
explicitly tells and shows.

> I also tried curly braces ( as suggested by your awful documentation ), but
> this just leads to
> `syntax error at or near "{"`
>

If the characters are otherwise correct curly braces works just fine.

When writing a non-integer literal you always enclose the value in single
quotes. The documentation generally omits these mandatory single quotes in
the interest of readability. You'll need to get used to that.

>
> What I want:
> a) That your documentation tells me the syntax for this
>

It did.

> b) That your error messages FOR ONCE are not useless and tell me the
> expected syntax, you are wasting millions of hours of developer time and
> human life, because you can not be asked to make useful error messages.
>

That is generally left for the documentation. The time spent on error path
messages seems generally sufficient IMO; though I would agree that a patch
to improve this one wouldn't be out of line.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Christophe Pettus 2020-11-19 00:19:57 Re: BUG #16726: Invalid input syntax is not a useful error message
Previous Message Vik Fearing 2020-11-19 00:15:09 Re: BUG #16726: Invalid input syntax is not a useful error message