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 1wBDB9-000qXR-2V for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2026 14:49:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBDB7-00CiG0-2i for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2026 14:49:50 +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 1wBDB7-00CiFr-1o for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2026 14:49:50 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBDB6-00000000N3m-0kU2 for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2026 14:49:50 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-4764484296eso1249032b6e.3 for ; Fri, 10 Apr 2026 07:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775832586; x=1776437386; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5iDJnN4MdrQHv3p6dSw9X6j5GSzznOc7Mq66uiWiiDM=; b=Z9jUD4tJeul6F1rSF2ycwQ00+reWM2A9H5wtrm1i2RiEoI5inen47O5wyMYfO0h9Cn BK6vFDANONFpe7Lw8hNSZMyOGfCEjp2zxjuIN8+PZ5yfGyGZNRkKGjG5ZEU3DagkAtLS H4ZO/2VRbtgSMCwGONQIKvkdlFqvrxZS0xybFoSn/FXGiSBT23uJFECPjL4AW3HXq+Jk TpXrsdJKxhsDhfxGKvupzF2DmaUvX8afuFMHu7WiwSWOrm+nrLQPq95kWfESrpWpKpc8 EQNZAeNbYPWy+0AoEToItFoVNASDwigPIyXBDJ11eflzLMHK3t/7/tV8xoNIO4y70AoT YHdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775832586; x=1776437386; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5iDJnN4MdrQHv3p6dSw9X6j5GSzznOc7Mq66uiWiiDM=; b=JSD/zyG9htS/WNhnfyz1+qsmdj5lAc39ELQ2nj2TDEwNdeJOClNuapfkO1uav4LPQg 8884Ifwu0Y8LquBpLJj5txlP0YhSGBrg9PmCQkOZ1l17YsRW2Z/UOuTXT2YxSQ1bp9id UqZXVin7IIuACT7wjdGZ9ftFH85q8GK9DMy80T07ncl4V2qFDvk684O4l7evUiKx2RuK LXwWzqLGwcFtJn6w4Nv+Bt7aFCPufUiEleDHtHHmlvGqc0LWqDNNNZyPF0JlvJcFxiOh z498sF/464lcqLRpNudhmzECx4XrtrsQvut7OOPpr8YceFNAiY6BxJl4g1cTNleblTjb jWrw== X-Forwarded-Encrypted: i=1; AJvYcCXBmiM6BtTneooI5BudH9Zf6qA4BLC+KxgxkzVNtUAZYZJBtC6lWkowHRxC6rbJ27rykmBLStuB0qy0FrzY@lists.postgresql.org X-Gm-Message-State: AOJu0YzrcI30kJikwC7Jo3Gx9ucw+RScZn9b3bKx1Pgnv9Ot6NDEL9/z dQuokM6Pll3HK1nAiE3G+P3fFo4dzNArPE/Skoy7ji/7/xlgSWWNPih0 X-Gm-Gg: AeBDieu+dSWDzZcalUgX5UweT7j/zK9g8Ou/fkPG/7BBElmy0auYOxWSEEACDH58x3B lyFOs7EbOXr/RfPvf/NPhpKve0rRu7bpg5L1UN0VTXVK1llUIwkuZJrE1yhCUjZlW/3P08Lrw5r 3beDlxXE/85yYZisGXYfj9+M+9aRUFfDNrs4XdbhmhKe6UybFybt7RpGvhgNw5DLLtsZLcmI9an oGos6pedU4gCXkOgFQuEpWWACg2Midjr3AvSCW2Egylc9J52yzF8twdZj0aPqKeunYx32vAZ41X Ti5jMp7RRs2sWbjOWHr6c2v7MHD1KQmjjrd9Hk2zmO9ZiMcK3k0flpRpB0INmhUtvcGkrcRMEOt 4FLAtdfLDKd92OPF5Ms4TsjSFD5dmssi71VN2eu42SIHnYw1BWMwqluj+UptHjkkMpzE8dzHzS0 VWzquR7RsEAA+6XRb/UswxSrQa4SOTCEoHONLKFeIVcLTgmlQj8scGRo/ii3+uufnk/YI5pyrZG wjjKsmHV4TQlFcaa2gW/g== X-Received: by 2002:a05:6808:6a83:b0:467:1376:1cde with SMTP id 5614622812f47-4789d15000fmr1918520b6e.17.1775832586158; Fri, 10 Apr 2026 07:49:46 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 5614622812f47-478a080d1edsm1566337b6e.2.2026.04.10.07.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2026 07:49:45 -0700 (PDT) Date: Fri, 10 Apr 2026 09:49:42 -0500 From: Nathan Bossart To: Andres Freund Cc: Thomas Munro , Nazir Bilal Yavuz , Sami Imseih , Tom Lane , Tomas Vondra , Michael Paquier , Andrew Dunstan , Amul Sul , Zsolt Parragi , Robert Haas , Chao Li , Anthonin Bonnefoy , Fujii Masao , Jakub Wartak , PostgreSQL Hackers Subject: Re: Documenting coding style Message-ID: References: <3579709.1775151816@sss.pgh.pa.us> <63de1553-829a-488d-8ee0-976afb8dd32c@vondra.me> <3586483.1775155672@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 10, 2026 at 10:17:44AM -0400, Andres Freund wrote: > On April 10, 2026 3:57:56 AM EDT, Thomas Munro wrote: >> I thought we agreed to stop using Size for new code? size_t has been >> around since C89. > > We really need to start documenting some of this stuff somewhere. > Deciding something a few years ago, deep in a thread, won't actually help > anyone but the participants (and maybe not even them) to know about it.. I certainly didn't know this. There's no comment in c.h, either. > I wonder if we should move the coding style section out of sgml into a > top-level CODING_STYLE.md or something like that. > > And then obviously add things like Size being deprecated. Unless we're going to actually remove the typedef in the near future, I'm not sure I'd support even marking it deprecated. If we're going to keep it around indefinitely, that's just going to become another source of nitpicks when new contributors inevitably copy/paste some code from the aughts. A style page makes the situation a little better, but it's yet another thing that folks have to remember. To be clear, if someone proposed a patch that completely removed all traces of Size, I'd likely support it. There is indeed no reason not to use size_t. (I see that Size has been an alias for size_t since 1998 [0].) But it's also quite heavily used, so I'd be fine with leaving it around and considering it fully supported, too. [0] https://postgr.es/c/0ad5d2a3a8 -- nathan