Re: Change error code for hstore syntax error - Mailing list pgsql-hackers

From Sherrylyn Branchaw
Subject Re: Change error code for hstore syntax error
Date
Msg-id CAB_myF5F3eyNr0q6_hYTTvnKbSmE24_Ot5fCcKrtEoZYf0jWzg@mail.gmail.com
Whole thread Raw
In response to Re: Change error code for hstore syntax error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Change error code for hstore syntax error  (Robert Haas <robertmhaas@gmail.com>)
Re: Change error code for hstore syntax error  (Marko Tiikkaja <marko@joh.to>)
List pgsql-hackers
Finally returning to this...
 
Hm, class 42 is generally meant for SQL-level syntax errors.  Are these
errors not coming from subroutines of hstore_in()?  I think our usual
convention is to use ERRCODE_INVALID_TEXT_REPRESENTATION for complaints
that a data value does not meet its type's conventions.  In any case
it seems closer to class 22 than 42.

I see, thanks for pointing that out. That seems like a useful distinction to preserve. I've updated it to ERRCODE_INVALID_TEXT_REPRESENTATION accordingly.

These seem to have multiple problems, starting with incorrect
capitalization and extending to failure to quote the whole string
being complained of.
 
I've modified the messages to comply with the guidelines, with a little help from a colleague who actually knows C.

I'm attaching a revised patch; please let me know if there are any other issues before I submit to the commitfest.

Best,
Sherrylyn
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: asynchronous and vectorized execution
Next
From: Simon Riggs
Date:
Subject: Re: asynchronous and vectorized execution