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 1wDahZ-0039IN-2e for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2026 04:21:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDahY-0085gd-1o for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2026 04:21:08 +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 1wDahY-0085gU-0Y for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2026 04:21:08 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDahV-00000001aUg-3ul3 for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2026 04:21:07 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-79ea87af213so19966497b3.0 for ; Thu, 16 Apr 2026 21:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776399662; cv=none; d=google.com; s=arc-20240605; b=VBsbQEhWfmZjB0SjkjV3Iivfq52WQZuT0jcvBqBYG5I/GiA6rJJi1qKL9eFBkvTM26 EfMjKrXouX0dFyFZjyMlOsTDWqTTjUoGlI5WCjVql2ODbBWfVrQag3PvA9UzC3HevJKc gGrHHXncZ7/b3Uq2nbyLJgvCDPzyyjU1iMUGZ8LxJtgAMMIbRKc7ICDHzU2GVA1NuWjZ FtBPUBdRorAw1nO1lngoNGTEVmUBW8UY1xZwaewl/wd32gCkBruaXyJKf3ZmkS71CIpb qMzSakEHjhXFp7g0EsxbTgzUdNj6SxsjnX1ChpFMyHnljqHqQbqtxZpZGPeUNxYLMJPl Ri/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=veCuyi5JQM5MbcZGcGMVAK1a2yYRt3Wyh0FTL1l1th4=; fh=PkVBerC6UzACPR7v3taCVtFxAVcF54QDcRLVYK/Bc/A=; b=OcxnIz1idDhp/klUz+4Ro9kteMY8qO9zcoXlF+cH5nZ7sY6pjW2o2G8NvYCfRvUxEg 8bv8YFdSadRyGYZfSldIZ1t+fdMhkv8STcJJcCtL1byQvPZVSTEZeYgYGmOEpgLl6Y9E Yabp3lxrFN8P3V5rHC2EorIJR2fyxqKCCUPH2H4GjZJCiIiBIe+JWsZDNb/Wyd09MDGv HtLZ5yQVUFpQDtLVK7xV2HfweFq+7ko+zn6fkINeNiLTBqv0WDVz7lzydavvxXF0oQQD IpVa33duX26VylUV2QEEtWMy0QhBdJfJ2cbSdCj6JQgtvGYdbd8xCGiUuR06K7dztYvH lOfQ==; 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=20251104; t=1776399662; x=1777004462; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=veCuyi5JQM5MbcZGcGMVAK1a2yYRt3Wyh0FTL1l1th4=; b=FbAd5cV2BikWFRu+rLg8y547w2W5SPARa00HEjZZ4bDPsIPiSbU1fo7GggHiPIUHJ+ ftZanhDBXudI7gVdeSy+eGUWIlHZ6HRZhRVTC3fdcYSc7lwTRuhUJE0AHVlrEMjAhsJ0 NhQjodl8tFky8lMcYDcWPgJon/+3Z+jGM39B7v7CtMgYoi3Re5YffH5IPfswypxzv+wC bKqHIHwjJAy5ZM+gwum8SJQBxSt+lfBADbdV3OQ4QmrDYNyDVnI4sJ7FIOxcjFbcJq+V caPLqFha/XmocUjeFctT5FGkFIDep1xcTQgHSxgGOCGikEbunIrBq3f07yiabxRgGo7r LmOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776399662; x=1777004462; h=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=veCuyi5JQM5MbcZGcGMVAK1a2yYRt3Wyh0FTL1l1th4=; b=KgCVmwt84OidbU1/+nDN4t+A0iJM8Pce6LxoKJTnVoK0VxCro0R2ZaLw7xR5Z7GABP lKYmuwrUBw1BHqNH657RqaMZD+zD+5JzbdZKtZDB1IJrrIbzQbxQeZi56FJ6l7fwtJKY /kAfQKaewyh5h7SOEEyN5/PK8E/joKbep6ppL6pFQJON7QZzwojY/D/x/UvYiFVVRnsn S3fUKN603hQ9wJ8Ai468DeBX4fV8JPz+fAUxA9o2z9mKFmBtmQVM3DW4F7UdOAFFzJk+ vrsr4uGhrpiT2bq2QufnMjVYEeUbBMbCuw8r4fxmiDq3av4LxL2GJHhdyzRGU6DdvqPx B98w== X-Forwarded-Encrypted: i=1; AFNElJ/ShfE8AfY6cQ0P1a2FltPnRLkyFsnRRxBUjEtjZnY7HfDRLeIZwX2Lq1+n0bLKuHhL5F5OiFwZeWweqhiX@lists.postgresql.org X-Gm-Message-State: AOJu0YzR1KqNFAPf7GucRV5O1m0K+nt9t4Z36qLdv03+P9JhR6De4hYR tZVN4FoddREw7bigsu1XVEGN5doHgr3vYP/Iu6wNBJrWHzy2NO5Xn22ajkaB/aQ9iT9f7G80pqr zEDy84Iv7c+2xq3450NVjNHzJN9jznC4= X-Gm-Gg: AeBDievN+vov0b+TcBoOAmTOvm222fxxwnVYJHTb+8mmoIGvubNWp1tMwEKfE8vX1Wi XHbuTQHj3m53LSxPD6hy48SkaXkIRaJMyBAKWAbMba55NJqRUCQb7Yq5p4MnvyIQFNtJfxF8IcS aiq7sVnEzh4pudsP5NM6ECjYqHUM4mC3fl6zEWfxbaexZ8KR6oiBpyvIV75wodNC2vvvxcPMVjJ z08MXGUGISIUUoVFKDXeNuUILyVS0u+OYYh4V9/fMUfeoNWcDIKGAS5z0sQ0uzMLVJIWtuGw1xh 6xpUleWzrZGjDPgzKQ== X-Received: by 2002:a05:690e:14ca:b0:651:bbb8:3ef3 with SMTP id 956f58d0204a3-65311889bc7mr852703d50.7.1776399662578; Thu, 16 Apr 2026 21:21:02 -0700 (PDT) MIME-Version: 1.0 References: <976a432b-9221-4825-8e8f-41f4375737fe@app.fastmail.com> In-Reply-To: From: Lakshmi N Date: Thu, 16 Apr 2026 21:20:52 -0700 X-Gm-Features: AQROBzDBqeUywoApbOs4-YLqT5l3L81fDWOcrPpaA5B_B2UVxFkff8qRZOGSti8 Message-ID: Subject: Re: Reject invalid databases in pg_get_database_ddl() To: Amit Langote Cc: Hu Xunqi , Euler Taveira , "pgsql-hackers@lists.postgresql.org" , Andrew Dunstan Content-Type: multipart/alternative; boundary="000000000000ddff6d064fa046d4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ddff6d064fa046d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Apr 16, 2026 at 8:31=E2=80=AFPM Amit Langote wrote: > Hi, > > On Fri, Apr 17, 2026 at 11:49=E2=80=AFAM Hu Xunqi = wrote: > > On Fri, Apr 17, 2026 at 10:16=E2=80=AFAM Amit Langote > wrote: > > + /* > > + * Reject invalid databases: datconnlimit =3D -2 would be emitt= ed > as > > + * CONNECTION LIMIT =3D -2, which cannot be executed. > > + */ > > > > This comment looks a bit too centered on datconnlimit=3D-2, but the rea= l > issue is that an invalid pg_database row should not be deparsed into DDL. > So, maybe rephrase like: > > > > /* > > * Reject invalid databases. Deparsing a pg_database row in invalid stat= e > > * can produce SQL that is not executable, such as CONNECTION LIMIT =3D = -2. > > */ > > I was trying to be precise about datconnlimit =3D -2 being the thing > that produces invalid SQL. But your version covers that with the "such > as CONNECTION LIMIT =3D -2" example, and it's closer to the original, > which was on the right track, just needed to be more precise. Let's go > with it. > This looks good to me. Thank you for reviewing and making the changes! Regards, Lakshmi --000000000000ddff6d064fa046d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

--000000000000ddff6d064fa046d4--