Re: BUG #16726: Invalid input syntax is not a useful error message - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #16726: Invalid input syntax is not a useful error message
Date
Msg-id CAKFQuwb2iETtDyFfgsA37sep9A04haxGvEZ-+tJgFfFQeBTGfA@mail.gmail.com
Whole thread Raw
In response to BUG #16726: Invalid input syntax is not a useful error message  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Wed, Nov 18, 2020 at 5:04 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16726
Logged by:          No useful error message
Email address:      nozdrum@gmx.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.

pgsql-bugs by date:

Previous
From: Vik Fearing
Date:
Subject: Re: BUG #16726: Invalid input syntax is not a useful error message
Next
From: Christophe Pettus
Date:
Subject: Re: BUG #16726: Invalid input syntax is not a useful error message