[postgis-devel] Code formatting digging in

Tomas Vondra tomas.vondra at 2ndquadrant.com
Thu Feb 22 14:26:39 PST 2018


On 02/22/2018 10:53 PM, Sandro Santilli wrote:
> On Thu, Feb 22, 2018 at 09:20:31PM +0100, Tomas Vondra wrote:
> 
>> Considering how tightly is PostGIS coupled with PostgreSQL, I think it
>> would make perfect sense to use the same code formatting.
> 
> You can currently build PostGIS by just installing
> postgresql-server-dev package (for Debian and derivates)
> I'm not sure it does include the formatter ?

AFAIK that only includes header files, so no - pgindent is not there.
But it's not like it's a massive tool - you can get it here:

    https://github.com/postgres/postgres/tree/master/src/tools/pgindent

and include it in PostGIS. Or to be more precise, it's a separate tool
available here:

    https://git.postgresql.org/git/pg_bsd_indent.git

and the thing included in the main git repository is a wrapper,
configuration, etc.

> Also, could it not still change between releases of PostgreSQL ?
> 

Not really, it tends to be very stable. One of the primary reasons why
we have pgindent is to make all the branches more alike, to make
back-patching simpler. Changing the formatting rules between releases
would directly contradict that.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


More information about the postgis-devel mailing list