Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pxhPH-00020K-Su for pgsql-general@arkaria.postgresql.org; Sat, 13 May 2023 05:03:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pxhPG-00033f-8j for pgsql-general@arkaria.postgresql.org; Sat, 13 May 2023 05:02:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pxhPF-00033R-Rp for pgsql-general@lists.postgresql.org; Sat, 13 May 2023 05:02:57 +0000 Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pxhP8-002LRw-HZ for pgsql-general@lists.postgresql.org; Sat, 13 May 2023 05:02:56 +0000 Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-ba6d024a196so2119473276.2 for ; Fri, 12 May 2023 22:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683954169; x=1686546169; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Znpq8Nzce6V7/oDQ1YgPz/sKOnTzETxx+kMyqyzJoTk=; b=LP42QjjSFhjpsHdEYMmHlMkACwcIHkBrojMQQGw5I5rCwGwAxJX3T/8158gxU8Q+xp mjEImgnzGdUo+uLaXOwhPL7RRARfQw/dFP8gIBqtXa77HsPkSRN//RdiZpoXTg2sRQV7 A+SH6CtNkkCDJaUFHIQckwvEHIRp94M4a7Cl7kdqmwRMlGGLVKr0Dwt3k1E4T8QjjS6R O0uV+1cmMAvTZyfeWqHRKLypQiaXhtSOPIs/M/fJzuLcP4Y+B3WAjT4hV0UUwf6mmtL2 CgJSpj06KpIYx0Wu0tWFcUMTolJ2+jWRkfmmNgcHsGLd57+4xR7BkcMzEKTGlXNJ+68K aAuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683954169; x=1686546169; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Znpq8Nzce6V7/oDQ1YgPz/sKOnTzETxx+kMyqyzJoTk=; b=TdXYAJoXHt3PKOcrG8ASd4RahiGtSVy49ona/LH4SEWuDNQseArnbvguOvWEIkW9C9 Yew2NwCfoQHHCBRLy3pycR1jhx45Hp0Co89kbqGb1NQMQqDcyuzEf4Tx7sbWHsKD9z2x GeJOjNw7thLRAdb2xCDE0o3NEGYQxkzpw8bC9tBEYnzNu5XgV29U21sMWpAMVp6dD9QP bWgo+lTOoMniTmP9vHrGDWFP6M9g310CyJMPxByam9irb98xH33BlSYVzD6zzMJhHUFr WB41BemKffSR3J2a7yR9D7TEf1Dss3QH0+sQyfwc0HJOicVtFuoNj/1xcZp/TXZanrcp jL8A== X-Gm-Message-State: AC+VfDxJx8yLaRBXKE8Hj3noRs3ob9g/5WB2q1SWFL7/1NVrqlTumsS6 DfJBhGkmgfDq7AFp2CLrqbIQLbXv9jE= X-Google-Smtp-Source: ACHHUZ7aVWrrzfbiMfIJE3UqFYhSTh0PnuY4E4Oc2k9jmkCescLGOiNVLHgOSJVdGI5/N+NujNCZ1Q== X-Received: by 2002:a25:6dc5:0:b0:b99:7a57:d65f with SMTP id i188-20020a256dc5000000b00b997a57d65fmr23407965ybc.34.1683954168648; Fri, 12 May 2023 22:02:48 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:517:b6a:fc7c:c06b? ([2600:1700:bd2c:b810:517:b6a:fc7c:c06b]) by smtp.googlemail.com with ESMTPSA id u1-20020a259b41000000b00ba6ffc7ef35sm886283ybo.65.2023.05.12.22.02.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 May 2023 22:02:48 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------3YD1IE8S83QIo0fH5Uby4sDL" Message-ID: <1aac01a1-d9db-8048-9bfa-1e4f9bb69a03@gmail.com> Date: Sat, 13 May 2023 00:02:48 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Adding SHOW CREATE TABLE Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <7a5d6750-84fa-59b0-33c1-7a5d26b9bc74@evolvis.org> <1565715.1683923271@sss.pgh.pa.us> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------3YD1IE8S83QIo0fH5Uby4sDL Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/12/23 18:00, Kirk Wolak wrote: [snip] > Where do we draw the lines? At other tables. > Does Table DDL include all indexes? Absolutely! > It should include constraints, clearly.  I would not think it should have > triggers. Definitely triggers.  And foreign keys. > Literally everything within the <>.  (ie, no ALTER > .. OWNER TO...) > ALTER statements, too.  If CREATE TABLE ... LIKE ... { INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL } can do it, then so should SHOW CREATE TABLE. -- Born in Arizona, moved to Babylonia. --------------3YD1IE8S83QIo0fH5Uby4sDL Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/12/23 18:00, Kirk Wolak wrote:
[snip]
Where do we draw the lines?

At other tables.

Does Table DDL include all indexes?

Absolutely!

It should include constraints, clearly.  I would not think it should have triggers.

Definitely triggers.  And foreign keys.

Literally everything within the <<CREATE TABLE X(...);>>.  (ie, no ALTER .. OWNER TO...)


ALTER statements, too.  If CREATE TABLE ... LIKE ... { INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL } can do it, then so should SHOW CREATE TABLE.

--
Born in Arizona, moved to Babylonia.
--------------3YD1IE8S83QIo0fH5Uby4sDL--