Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHd2k-0003CF-AW for pgsql-docs@arkaria.postgresql.org; Fri, 08 Jan 2016 19:49:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHd2j-00051p-Qo for pgsql-docs@arkaria.postgresql.org; Fri, 08 Jan 2016 19:49:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHd2O-0004cu-9g for pgsql-docs@postgresql.org; Fri, 08 Jan 2016 19:49:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHd2L-0000v1-0N for pgsql-docs@postgresql.org; Fri, 08 Jan 2016 19:49:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u08JnM6I021343; Fri, 8 Jan 2016 14:49:22 -0500 From: Tom Lane To: Kevin Day cc: pgsql-docs@postgresql.org Subject: Re: Document Upper Limit for NAMEDATELEN in pgsql 9.5+ In-reply-to: References: Comments: In-reply-to Kevin Day message dated "Fri, 08 Jan 2016 13:29:32 -0600" Date: Fri, 08 Jan 2016 14:49:22 -0500 Message-ID: <21342.1452282562@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Kevin Day 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 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs