Re: Current enums patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: Current enums patch
Date
Msg-id 27552.1175545408@sss.pgh.pa.us
Whole thread Raw
In response to Re: Current enums patch  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Current enums patch
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Working patch attached. If everyone's happy I'll apply it.

Why not put the create-time length test into EnumValuesCreate's loop,
which has to grovel through the list already?

I'm wondering why bother with the temp variable in cstring_enum,
as opposed to just "if (strlen(name) >= NAMEDATALEN)"?
Also, a comment about why the test is necessary seems appropriate,
since otherwise someone might think it redundant:
    /* must check length to prevent Assert failure within SearchSysCache */

Lastly, a three-part regression test for this seems a bit silly.
Or a lot silly.  If we added test cases for every niggling little
bug we fix, the regression tests would be taking an hour to run
and would be less productive, not more, because people wouldn't
run them as often.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Concurrent psql v4 [WIP]
Next
From: Bruce Momjian
Date:
Subject: Re: Dead Space Map version 3 (simplified)