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 1vQ7eJ-00BCI4-2n for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Dec 2025 17:25: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 1vQ7eI-003p7f-15 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Dec 2025 17:25:18 +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 1vQ7eI-003p7X-09 for pgsql-hackers@lists.postgresql.org; Mon, 01 Dec 2025 17:25:18 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQ7eF-002bhO-22 for pgsql-hackers@postgresql.org; Mon, 01 Dec 2025 17:25:17 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-3e7ead70738so2379087fac.0 for ; Mon, 01 Dec 2025 09:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764609916; x=1765214716; darn=postgresql.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Ni0HlNyE72iicCo2I6MJenvrV7w2YjH7+l9ewCTTAcM=; b=DBT4n0kkuARqBW5HF/ZgeUoONqh2q0cJ10YsV5XVJeXDZh5ipGJABInlIhj+wFlG5s CLsp6Y40pU3+xKA7sqiwXOYKx0W0gIe252bYwJRoqySXeERxoJDUhHz+OCdWqjjodWwj ZPju38U5vpMB+fdyni8obtI8KsUhaIBL+CYnQTGU25vluPDfUqlc5a+UPM5yExkqWfBB A3Kb4KnjS/JoJl7Di/pTv++zsuYRjfeueOQsmFUan4uc5TREK+Y04nNAVsokLstckv51 m8jMOYrhratK0EmhZzK3ED38nCQVchTufU6h11tMblbmPvueDoXKvfeI6/zc/DoVIlY5 zTMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764609916; x=1765214716; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ni0HlNyE72iicCo2I6MJenvrV7w2YjH7+l9ewCTTAcM=; b=N2Mw5iAUfD+bM563zhrr/z2dIos5QIN0dcTswsMYezLdVoG2sI6xMCrDIQ836tWVcv qKnL7qeLaVoStZEW9qZiOsZeAFepCAUUCEp2HmBlb+yIf96vWCHSMNXWHV1chP3sRgaH D0SoOzElqWtrp7ffwDs3908pgHWUk90LPbajTveiDO5TKF5hLSG9tlnpsJTxJFD6PapZ 4MuEb4WM6sF0rDNxQ8yrO78LeQwjls26p4goSXGAcvz6HeCRIE8Z8z1O9hD2qYhd4GFt 2sIMV1GsgAXcVr+uKc78Z48CE4rIxeYo1RCSxqEwEW/JTd8d1EgXCT9GS/C1rLqrNXGt sBWQ== X-Gm-Message-State: AOJu0Yy58ewvkJs9GUGh/JmkV5p1RlHDhpqMA/m0vSuT0gWVuu/OScFt 3FoegcGT6asF0dQHX/XoojIcmtDJtkjHpS9F3iC7KbvLcDe5sfDj/vyhNpAwwg== X-Gm-Gg: ASbGncsSSF5+c3YvpEMNjeNjlWrPOdJhp+lW7QmCryCp0TY/sFgk7bvgkl+b+DKX5Wv RnVwmIUJNNO88kK/QfHr4jQ4pR9u0D7wCQ9bMcpmdrze22t2ZqdqSxj+6fbMsgE01Vq0XrioLqQ 4YEZtNCvV1gftCbqPmzMQVfEYsl+4LroEVq6ZWLaLN3qpcVOS7HkgsOjlFM7o0G18gemzTmWntc TtbHy+WwxHy7C3hd5GrfSEIfJnU2ZzOD4QXV+8YcCLqM82y+2LtQ/uftdsCsWr4b9h5S0+yiuv3 bRIDViLQhixaJ1vFokMleq8rAnSfHL10MIn+p5BixomXKCGGFwxwv/EWaMiu1IfSPrPk80nlJPg peRfEphvUe1ksSSOtL90MqPnXPOug0J5rH9extZ1SV7CyIrQBDn96gWRbDL7TtH+ml9KelAKHej n2MHEyabmQwNI8wOfgXIm+44ZWfTYdxi47Q7s67BJEcnR1jEhG7flX82Mn4h9RexOsB1o7SsHpv ZYH X-Google-Smtp-Source: AGHT+IFwu1VW8RY9Skzb+yGZjZ3+QtltdDaSiGKOJDf4upkjV5t0O1ZEu/oDzhme9Nkv35i8aBpIBA== X-Received: by 2002:a05:6808:6b48:b0:43d:24b7:2b93 with SMTP id 5614622812f47-4514e63de09mr11578188b6e.17.1764609915654; Mon, 01 Dec 2025 09:25:15 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4531708f448sm3926249b6e.12.2025.12.01.09.25.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 09:25:15 -0800 (PST) Date: Mon, 1 Dec 2025 11:25:13 -0600 From: Nathan Bossart To: pgsql-hackers@postgresql.org Subject: split tablecmds.c Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This file has over 22,000 lines and is too large to be included in GitHub's code search results [0]. It appears to have been given its current form in 2002 by commit 71dc300. Previously, it was named command.c, which dates back to the 80s. Is it time to split it into a few different files, similar to what was done to copy.c in 2020 by commit c532d15? After briefly skimming through it, some areas that seem like they could potentially be moved out are partitions, constraints, permission checks, inheritance, foreign keys, column expressions, table rewriting, attribute merging, TRUNCATE, and CREATE TABLE. This is far from a concrete proposal, but I first wanted to gauge interest in $SUBJECT. [0] https://docs.github.com/en/search-github/github-code-search/about-github-code-search#limitations -- nathan