Re: BUG #14883: Syntax SQL error (42601), but should be a different error no

From: Stefan Hanenberg <stefan(dot)hanenberg(at)googlemail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, stefan(dot)hanenberg(at)googlemail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14883: Syntax SQL error (42601), but should be a different error no
Date: 2017-11-03 11:09:47
Message-ID: 1c1d01f6-40fd-92cf-e3e8-daa3723ccfc9@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Am 31.10.2017 um 03:50 schrieb Tom Lane:
> More generally, there are a *lot* of ERRCODE_SYNTAX_ERROR calls in
> the backend that could arguably be changed to something more specific,
> even without inventing any new subcategories for the purpose. If we were
> to decide that we're willing to make a compatibility break here, I'd
> rather see a patch that goes through all of them and changes what seems
> reasonable. Better a big break than drip drip drip ...

I would be really happy if the error codes would reflect more on what
the error actually is -- at least for our automated tests, it turns out
to be quite complicated without directly using Postgres -- currently, we
have to use our own SQL parser in order to double check whether the
error is actually an syntac error or not.

Thanks for your reactions!

Best,
Stefan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kalin Daskalov 2017-11-03 11:18:53 Re: BUG #14885: mistake in sorting win1251 chars
Previous Message Francisco Olarte 2017-11-03 07:22:25 Re: BUG #14885: mistake in sorting win1251 chars