Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w2pAJ-000djq-0t for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 11:34:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2pAI-009ylp-0P for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 11:34:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w2pAH-009ylf-2m for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 11:34:17 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2pAF-00000000vAC-21BA for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 11:34:17 +0000 Received: by mail-qt1-x842.google.com with SMTP id d75a77b69052e-50904a8f421so60510681cf.2 for ; Wed, 18 Mar 2026 04:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773833654; cv=none; d=google.com; s=arc-20240605; b=inNy8j/s7Tg0s3lH746XtWFqpqZXpT97jXEpVFvIgubtYjS6It0b7yR6oZqrnIyFMa +cXf7b3qg4L2fX1zhPR2bV3hH4FKZmQLIVpuGxRtY3jpUHQKFu/EZ9UurL48MWC8RpXT bEZOsvyKsJqTg8lY4o0B+M7vUS3wxCjEKjyuWodemVZRjf2kjVsoSirErUhW3HKvzX79 9gilczGbK1dYC7ENpz+pNGoXXCd3amPuiWYmBsYmQvqN7ZL5u2EUybji1zUJVvlqFA6w gyaihB2VZlVGyuSbvI9bzX31K7jeHpjakz2AnzL6jXI7gMFgnw793YJLilWJow1yFoV8 wJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8MkqU5RGdEjQ4xSqTt+quh2mkdg4z0RK3mghbMQ+u0U=; fh=cKv3Gj9IlEaazVYgaN4w2o1VSi2YXQPt0KpgozySuHA=; b=FlNkFD0dKXTkmUPvrYMBNUU+6TpBIHSeZlTqB/aKP+wJAayGJiv0pRyZ3o6cYLDN8t 8CE+jkDGAYmTG/vATBKDyfRLh0wyjoMxmyebgdexBz0yZlpEe9lrUrt+zeTtrdPUmijx dYSDQS0wWjhsboDCzQp9+6F5/0SWuHWgdJyY5wKyH9Wvrb+W5qJVUqdpoRvnqNvnw1Uj rsRJN0+o/Q25Lkdn2q9CQN/qAaRZ38vna6Mh9075aAxQ+zdhSIb/DacuWg7g24LVgxUs uidM7p/I+z+2K3JPd3jk1Saa70zYHCgPLyCTjSSp5LvWhKlG37Y4bfUAI5vtE3dVj7uo DpQw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773833654; x=1774438454; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8MkqU5RGdEjQ4xSqTt+quh2mkdg4z0RK3mghbMQ+u0U=; b=iaE2ghv/zv7gqOgb/+eQVOaPEu8bxRVlHRHAAV2meXvpN/SnYZHa7b4gwEyCodmpAt HptsUo7L737yIx6Cq8J1y9kVzXJHVYuJHmlXOoD8OBXy+0b0JLw1upPnhq/tigg/lX7g GvLW6XW9aO2NJqElWRha052VHVXGox+qhf6rS8U5AzMdrs30lPIvSH1tMAaEVYMH8eaL YdHh1OGrPdjlTRBLHpcvWl/ntV8m83i/tVZrGI60+9AvjJ2oqqeAAa/NmpwjUXeiLEaD urq8BxoH16IzRtKN7q7aWo8dySHWWn05lZ4Qu3YzyrH8H9zLL1PG8ZLHy6a4bDNqp6V5 dcPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773833654; x=1774438454; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8MkqU5RGdEjQ4xSqTt+quh2mkdg4z0RK3mghbMQ+u0U=; b=QayUsPz+7NHMPXiBJGPfssg3Pui5i7xbHFZxogC0SVbmnj0q70tNKbDbNXRBjbAdVb Y/LAEKQyF0gzkpl86OwicNsIxRP3i5YS4vlOe97WEPMYIKY0z6I9dDM+vQsbkV4jI6gG 6ZT3g04NKkY+MTGS+UE0OP8D8pGplfLIgaQ1swf+pL1VfSNpnNurVwGnGsOJoI1XpYBv XonLX0Eg+kmYiTKNuWLRkIS105d3YBrRGKTwQcnx3bNDYFx4FDaVZWR763gq43DJTLiS ylzz1yXXUO3Kc+ehi4OWRh+2Q8feEZus7L6ZUCb47KDpk7sSsNda+COuTrzzAUIJeTnb 0ysA== X-Gm-Message-State: AOJu0YwCueDrzFnLHBkChXzz+JN4kAAOm0TCy+APoGzSOonUf5sAOQE4 lzxpf1sTcxlwcYtEHRCagQwaioWnv5oQo9WnC2Zbehk6cNRcM6iHtqjrwIIUPANluoWUdC+v/k+ 9Ci7oXrUficN9Y+EbwG/TwdmlW1tmM7A= X-Gm-Gg: ATEYQzzCW2nG0pj/d7UWp2oCMTUZp043wQ6nPyDsqmnCHU90bybYogGhWzyzQaXuDuj 8K7UrZ2gswknkmi5beP7WejaCEEH0fOxwmqBPe6H/h+D0PddXa9jo+4DL6x4D8qpGutk2VadsZb b9ag0bvBVLz10ZeQmY8xUyAUtRFglhGmQwvpWUv059ZKsw4GHO+1GgOCNediUPvj7mejmPOJR33 GT4IL7IqVcULNcxV8eyCHpFK8n7Xyc0giIJ+tOlZIsNMzy4+38/O5zOLQIUpOpEa46/BG9nnwLd XStdL/T4biRh0Pumoxhcai7XOxTmyaFDOGOukNACE/XsQeEgKN5JX3qdpUTrZgNEOuE6WCgsXwF glNNShzxcBkD9XedAY97sA6EZUeI= X-Received: by 2002:a05:622a:d4:b0:509:1568:1f16 with SMTP id d75a77b69052e-50b148ec8d7mr35340821cf.71.1773833654130; Wed, 18 Mar 2026 04:34:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John Naylor Date: Wed, 18 Mar 2026 18:34:03 +0700 X-Gm-Features: AaiRm53nfgt_TUxk_WfoiZoBGY_63lMvOq_jtWAh56iHDTMopu633wCXRNbkEFA Message-ID: Subject: Re: Non-compliant SASLprep implementation for ASCII characters To: Michael Paquier Cc: Postgres hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 27, 2026 at 10:05=E2=80=AFAM Michael Paquier wrote: > > Even if we don't do 0002, 0001 shows benefits of its own. Seems sensible to me. I only have minor nitpicks: +operation for a single byte as well as a range of these, acting as thin +wrappers standing on top of pg_saslprep(). It's more natural to say "wrappers around", at least that's what comes to m= e. + if (unlikely(utf8_len =3D=3D 0)) The exceptional path only has two lines of code, so it's unclear what this hint is trying to do. This module isn't run by default anyway + MemSet(nulls, false, sizeof(nulls)); Regular "memset" with a 4-byte constant input is easily inline-able by the compiler, and I think we should use our homegrown implementation only when there is a specific reason for it. (I know there are many dozens of uses without a reason already, but...) -is($result, 'U+0000|SUCCESS|\x00|\x', "Only nul authorized for all valid UTF8 codepoints"); +is($result, '', "No empty or NULL values for all valid UTF8 codepoints"); I don't quite understand "only nul authorized..." -- I understand the explanation in your email, but I having difficulty with the way it's phrased here. (Although it'll be moot if we go ahead with 0002) --=20 John Naylor Amazon Web Services