From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21421 invoked from network); 12 Jan 2024 04:22:30 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2024 04:22:30 -0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by 9front; Thu Jan 11 23:21:39 -0500 2024 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id A8C4F1C2A0 for <9front@9front.org>; Thu, 11 Jan 2024 23:21:34 -0500 (EST) (envelope-from unobe@cpan.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding; s=sasl; bh=JDgfHrrAawL8gYmiZ/z3Tci3N q8bRYq7GMZsc0xOCn0=; b=gJJkyqO0Y0CDxKLEdhNKejO/R8MmAJWm/PGe+APD6 EvqhJY0zX5RX8nESW+fm/zoeQnhNSyPhRCMF2cLBpdWdO6McUMzEtZ8IZK1xUsdR p1V/4fJjiqZc7kNMnEjsp68cUdmHPXzB191apb9mHpzZB3SBeumeKRzqv34OcG6D UE= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id A13701C29F for <9front@9front.org>; Thu, 11 Jan 2024 23:21:34 -0500 (EST) (envelope-from unobe@cpan.org) Received: from strider.localdomain (unknown [24.205.13.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id C50041C29E for <9front@9front.org>; Thu, 11 Jan 2024 23:21:30 -0500 (EST) (envelope-from unobe@cpan.org) Message-ID: <0BB1F90701C5DE0F1B59CBD069E160E6@smtp.pobox.com> To: 9front@9front.org Date: Thu, 11 Jan 2024 20:21:29 -0800 From: unobe@cpan.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 0FD2813A-B102-11EE-BCE1-A19503B9AAD1-09620299!pb-smtp21.pobox.com List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: generic firewall metadata strategy GPU backend Subject: Re: [9front] [PATCH 6/6] ndb: document attribute name and value length constraints in BUGS section of man page Reply-To: 9front@9front.org Precedence: bulk Thanks, ori. I hadn't noticed that! But I don't see any corresponding soft limit for the attribute. Do I understand correctly that /sys/src/libndb/ndbaux.c:34 just clips the attribute down to 32 bytes? Quoth ori@eigenstate.org: > Looking at the code, Ndbvlen seems to be a soft limit; it's only > the initial allocation to save a malloc, but we can grow past it; > see ndbsetval in /sys/src/libndb/ndbfree.c:29. There is a soft limit > coming from Brdline, which depends on the size of the buffer in the > NDB struct; maybe we should document that a line must be no longer > than 8k. (This was bumped not so long ago to support the large TXT > records needed by DKIM). > > That said, I think documenting the attribute size is a good idea. > > > Quoth unobe@cpan.org: > > Ping. > > > > Quoth unobe@cpan.org: > > > I came across these limitations (defined in /sys/include/ndb.h as > > > Ndbalen and Ndbvlen, respectively) when toying around with ndb as a > > > simple database. This hopefully will save someone else some head > > > scratching when the query isn't returning as it should. > > > > > > Quoth Romano : > > > > --- > > > > diff 46cf9d4eb02a3a7c2516be3053994d4fb69eb949 0b5b2d58047b698564f6b1955a31cbcc95570abb > > > > --- a/sys/man/8/ndb > > > > +++ b/sys/man/8/ndb > > > > @@ -924,3 +924,5 @@ > > > > .I Ndb > > > > databases are case-sensitive; > > > > ethernet addresses must be in lower-case hexadecimal. > > > > +.I Ndb > > > > +database attributes are constrained to 32-byte attribute names and 64-byte attribute values. > > > > > > > > > >