Re: TABLESAMPLE patch is really in pretty sad shape - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TABLESAMPLE patch is really in pretty sad shape
Date
Msg-id 9351.1442673968@sss.pgh.pa.us
Whole thread Raw
In response to Re: TABLESAMPLE patch is really in pretty sad shape  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: TABLESAMPLE patch is really in pretty sad shape  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 7/23/15 6:39 PM, Tom Lane wrote:
>> + 2202H    E    ERRCODE_INVALID_TABLESAMPLE_ARGUMENT                           invalid_tablesample_argument
>> + 2202G    E    ERRCODE_INVALID_TABLESAMPLE_REPEAT                             invalid_tablesample_repeat

> Where did you get these error codes from?  The constants in the SQL
> standard would map to

> ERRCODE_INVALID_SAMPLE_SIZE
> ERRCODE_INVALID_REPEAT_ARGUMENT_IN_A_SAMPLE_CLAUSE

> Were you looking at a different standard, or did you intentionally
> choose to rephrase?

I was looking at SQL:2011.  My concern in naming them that way was that
I wanted to have errcodes that would be general enough for any tablesample
extension to use, but still be tablesample-specific, ie I don't want them
to have to fall back on say ERRCODE_INVALID_PARAMETER_VALUE.

Is your concern that we shouldn't be extending the meaning of these
standard SQLSTATE numbers in that way, or that I didn't slavishly follow
the standard's wording while naming the macros, or what exactly?

It's certainly not too late to change this, but we need to agree on
what would be better.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [patch] Proposal for \rotate in psql
Next
From: Andres Freund
Date:
Subject: Re: ON CONFLICT issues around whole row vars,