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 1wXqPt-003Vu1-1W for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2026 01:10:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXqPs-0000gm-0j for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2026 01:10:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wXqPr-0000ge-31 for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2026 01:10:35 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wXqPp-00000002GSH-3EYe for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2026 01:10:34 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-c857fba35cfso189153a12.1 for ; Thu, 11 Jun 2026 18:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781226633; x=1781831433; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=tMwKG0G5mmzgeTwKJNs803Fda82g+zLkdWwmLsHDrrQ=; b=C1L3HRY5Ds61oo6DXlgcj8GMRRg0rdLqKBiNGvG4pfqccSdfwuyCOX1z8tolrgFW4Q qmWWL/i7cY1+U2m76huFFqBT1ju2CSAhbXnXY/1YKlaZxGG1kqLUi2wCSVoH4ilWEync e8m8oEaPwETfw7JL88CRJIbXDEIYFfIFK2EhHGAAFp/OhejD+xZJHXmQu3RcMT2kxOd3 Lnh33RfS5tdp0k3psfUxYw7ijM9evK2NxK3f+xr+8LcjA25UaPPwSsB5X03Q4qq8ynIU kBfjp2doisNjrD+3SSofzyONdXD2rAykiUKYzbLfsS1tdKdajLJEluxKw3Ug+2KI0gVf RLrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781226633; x=1781831433; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tMwKG0G5mmzgeTwKJNs803Fda82g+zLkdWwmLsHDrrQ=; b=igBpeTS5MGyxJyxAnWB6de/HWGS3X8rjUykxMYFi6Qnpq/wHi+YzHQF4NUHqoBMsDW Vieh4x1TOTh/xAgCNREfF9nEZyFOg360PNABePlF6A2jKvllKAkKXcH2X3QJ9jBfIryj z+/dGSlqBebVTw5EOpHzFdAnZBKsFwKLFXEp7c3R42HR/mh3EpH6N6wCgLT85clho2/J 7pjHNiqXaFz8q1OS+XcYgsxMjpmamc6tqTovcHQRF1WOCm+xHgdW7ETDxSpFpNHZ9q8J JOqnFOZYjHeQ/Fo9AWawICHPXLkfUezTDI/Z7xGKOJJSTyxjVXQBFo+QDztDSYn+lahK uwPQ== X-Forwarded-Encrypted: i=1; AFNElJ97me3doTpS93kt+prZx1zc0gDCyDspqTYK+QKEzaCWtTTg6RV1UazBwRFxPAKdKsrcwopWqOAt1v0T2cwS@lists.postgresql.org X-Gm-Message-State: AOJu0YwtDpDySAwsvN3zZ7WFnKjMkxIyaqtAf5ATCoysM/Qopjyhd6a0 BrBRRf+hkQUZviJzNI/yZ7+kebwxIed3lQaocYyOhM7RxFNBpxinzVY7 X-Gm-Gg: Acq92OHIFE3WHbFbKdxjWgHu/U2DnIItbcusBdkYNeB29VnReoh4bQkw+Omfyl5eAs/ IPTl1J5KFMw0/JJDwlR3nMCDpkwIHCE5yKVQueCNF9PQkp3rq3vtp3UFLtd+F58rAyZJLXr31CR S6Mg++cpUwh9Fyw28vLPxEwiMyzoQkeZIOArvajiwqHl+3TIZBkYONvq99kUnbP0yWcITvKdXAA 53thTiE4U2eDvhNLertBd19mUBFyNEWjJCNbp4YAkA1E6tn5zQdZHZyfpkpNpgQeepsUbatfgKG JL5vCQieO60Eklz1wbfQrxLS5Q0Y+iuohET7ox6HAi2Phxew3qiecGkjk6p/YPT2JHx6cEwjp8d fXTN7mJIpl2tJnQ7BEjjrxuUVBISbI084dBcKyqS+f8UvpJAA/Ud7oe2l0js35/nkrI4zGHmRYs tn0U7dIpUYhgEkN4bjIeWHRwKzqLFzocM71MKG6DTKQYxT+bbL7+8I4M6p0RNvo/R6N1pVvs4= X-Received: by 2002:a05:6a20:9f4d:b0:3a3:327:c5c8 with SMTP id adf61e73a8af0-3b78356a9f7mr816283637.0.1781226632670; Thu, 11 Jun 2026 18:10:32 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c866518677dsm426142a12.19.2026.06.11.18.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 18:10:32 -0700 (PDT) Date: Fri, 12 Jun 2026 10:10:30 +0900 (JST) Message-Id: <20260612.101030.758511100369156914.horikyota.ntt@gmail.com> To: akshay.joshi@enterprisedb.com Cc: zsolt.parragi@percona.com, pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 29.4 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello. At Thu, 11 Jun 2026 13:18:07 +0530, Akshay Joshi wrote in > Fixed the issue above. The v5 patch is ready for review/testing. I have not looked at the patch in detail, but I noticed that some comments in the patch seem to contain non-ASCII characters. > * * re-emitting it as ALTER TABLE … ADD CONSTRAINT ― the column-emit I don't think that is recommended in PostgreSQL source comments, so these should probably be replaced with plain ASCII equivalents. https://www.postgresql.org/message-id/E1pnhhu-003D6z-Ki%40gemulon.postgresql.org For reference, I have attached the result of a quick search below. Regards, -- Kyotaro Horiguchi NTT Open Source Software Center Quick search result: ========= 20 matches in 18 lines for "[^[:ascii:]]" in buffer: v5-0001-Add-pg_get_table_ddl-to-reconstruct-CREATE-TABLE.patch 565:+ * re-emitting it as ALTER TABLE … ADD CONSTRAINT ― the column-emit 877:+ * defaults ― mirroring pg_get_database_ddl's pattern of 934:+ * SEQUENCE NAME ― omit when it matches the implicit 1042:+ * Table-level CHECK constraints ― emitted inline in the CREATE TABLE 1055:+ * applied per-column overrides ― DEFAULT, NOT NULL, and any locally 1155:+ * pg_get_ruledef, pg_get_statisticsobjdef_string) ― when 1383:+ * ALTER TABLE qualname ALTER COLUMN col SET DEFAULT expr ― one per 1422:+ * ALTER TABLE qualname ALTER COLUMN col SET (...) ― one per column 1468:+ * out-of-line by emit_local_constraints (the ALTER TABLE … ADD 1500:+ * ALTER TABLE … ADD CONSTRAINT for each locally-defined constraint 1617:+ * ALTER TABLE qualname REPLICA IDENTITY … ― emitted only when the 1749:+ * (#if 0) ― they will become a single helper call once the standalone 1830:+ * Pre-compute "." too ― the always-qualified helpers 1884:+ * Triggers and row-level security policies ― disabled until the 2680:+-- quoting (its prefix starts with "). Both forms of the prefix ― 2681:+-- bare-lowercase and quoted ― must be stripped from outer 3197:+-- quoting (its prefix starts with "). Both forms of the prefix ― 3198:+-- bare-lowercase and quoted ― must be stripped from outer =========