Re: [patch] ENUM errdetail should mention bytes, not chars

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] ENUM errdetail should mention bytes, not chars
Date: 2020-10-28 01:35:03
Message-ID: CAB8KJ=iUuq5K7xCijkCu9B3C+40QOuyhBsFfJyJ1v=1G7pndkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2020年10月27日(火) 20:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>:
>
> On 2020-10-19 06:34, Julien Rouhaud wrote:
> >> ERROR: invalid enum label "ああああああああああああああああああああああ"
> >> DETAIL: Labels must be 63 characters or less.
> >>
> >> Attached trivial patch changes the message to:
> >>
> >> DETAIL: Labels must be 63 bytes or less.
> >>
> >> This matches the documentation, which states:
> >>
> >> The length of an enum value's textual label is limited by the NAMEDATALEN
> >> setting compiled into PostgreSQL; in standard builds this means at most
> >> 63 bytes.
> >>
> >> https://www.postgresql.org/docs/current/datatype-enum.html
> >>
> >> I don't see any particular need to backpatch this.
> >
> > Indeed the message is wrong, and patch LGTM.
>
> Committed.

Thanks!

> Btw., the patch didn't update the regression test output.

Whoops... /me hangs head in shame and slinks away...

Regards

Ian Barwick

--
EnterpriseDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-10-28 01:36:51 Re: MultiXact\SLRU buffers configuration
Previous Message Tom Lane 2020-10-28 01:27:06 Re: Patch to fix FK-related selectivity estimates with constants