Re: split tablecmds.c

Euler Taveira <euler@eulerto.com>

From: "Euler Taveira" <euler@eulerto.com>
To: Álvaro Herrera <alvherre@kurilemu.de>, "Nathan Bossart" <nathandbossart@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-12-01T19:13:22Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Split copy.c into four files.

  2. The contents of command.c, creatinh.c, define.c, remove.c and rename.c

On Mon, Dec 1, 2025, at 3:18 PM, Álvaro Herrera wrote:
> My first thought would be to move code that deals with catalog changes
> to files in catalog/.  Also a couple of functions related to tablespaces
> could be perhaps be moved to commands/tablespace.c.
>

As Tom said partitioning has a big chunk of lines of code. I bet that's the
biggest portion. It seems a good candidate to be moved to a new file
(partitioning and inheritance). Besides your suggestion, I would add things
that set properties (RLS, reloptions, AM, replica identity, generated columns)
to another file (tableutils.c?).


-- 
Euler Taveira
EDB   https://www.enterprisedb.com/