Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Day <thekevinday(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+
Date: 2016-01-08 19:49:22
Message-ID: 21342.1452282562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Kevin Day <thekevinday(at)gmail(dot)com> writes:
> Postgresql 9.5+ may now fail to compile if NAMEDATELEN has been set
> absurdly large (In my case, 384).
> The file src/backend/utils/adt/levenshtein.c does a static assert on
> "NAMEDATALEN <= MAX_LEVENSHTEIN_STRLEN" with MAX_LEVENSHTEIN_STRLEN
> currently set to 255.

Hmm. I'm not sure whether 384 is "absurdly large", but I do wonder
why the levenshtein code gets to dictate limits on NAMEDATALEN at all.

Or to put it even more bluntly, I'm not sure that there is anything
whatever about MAX_LEVENSHTEIN_STRLEN that is well thought out. Why not
rip it out and put some CHECK_FOR_INTERRUPTS tests into the loops instead?

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Jürgen Purtz 2016-01-08 20:52:27 Re: Graphic to visualize data flow between processes, buffers and files
Previous Message Kevin Day 2016-01-08 19:29:32 Document Upper Limit for NAMEDATELEN in pgsql 9.5+