Re: The PostgreSQL C Dialect

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: The PostgreSQL C Dialect
Date: 2026-06-23 15:03:38
Message-ID: 003B55DF-CD13-44A2-BF3D-FC91AD9AB54E@thebuild.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Jun 23, 2026, at 06:53, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>
> I think the consensus is to prefer "size_t" over "Size" in all-new
> code. But when modifying or adding to existing code, match what's
> around you, which in many places favors "Size".
>
> "Index" is in a grayer area because there was never a solid consensus
> on what to use it for to begin with. Again, there are places where
> the match-nearby-code rule tells you to use Index, but if that doesn't
> apply I'd avoid it.
>
> BTW, you might want to mention match-nearby-code in the para about
> naming too. It's not like we have just one preferred naming style
> --- depending on where you look, there's camelCase, CapitalizeEachWord,
> use_underscores_instead, etc etc. I have no appetite for trying to
> force tree-wide uniformity on that score; but I do get annoyed when
> adjacent routines don't look anything alike.

Thank you! I've updated the page to include statements around this. I took the liberty of borrowing your "camelCase" etc. wording.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-06-23 15:16:30 Re: More jsonpath methods: translate, split, join
Previous Message Dmitry Dolgov 2026-06-23 14:29:41 Re: File locks for data directory lockfile in the context of Linux namespaces