Re: The PostgreSQL C Dialect

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: The PostgreSQL C Dialect
Date: 2026-06-23 03:53:34
Message-ID: ajoDPh9rt7hxmhkx@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Jun 22, 2026 at 12:39:36PM -0700, Christophe Pettus wrote:
> When I was writing my first PostgreSQL extension, I was at sea on a lot of the conventions that make up the "PostgreSQL C Dialect." I've taken my notes, added some additional things that confused me, and put it up on the wiki for review:
>
> https://wiki.postgresql.org/wiki/The_PostgreSQL_C_Dialect
>
> Feedback welcome, of course!

Thanks for doing this, that's cool work!

One comment about "The frontend/backend split and portability", what about adding
that (see 49bff412)

"
Headers never include postgres.h, postgres_fe.h, or c.h themselves.
"

say, before the "The FRONTEND macro" bullet?

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-06-23 04:03:21 Re: [PATCH] Warn when io_min_workers exceeds io_max_workers
Previous Message John Naylor 2026-06-23 03:32:49 Re: The PostgreSQL C Dialect