pgsql: Add output file argument to generate-errcodes.pl

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add output file argument to generate-errcodes.pl
Date: 2022-07-18 19:56:18
Message-ID: E1oDWqn-000ADM-Q9@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add output file argument to generate-errcodes.pl

This is in preparation for building postgres with meson / ninja.

meson's 'capture' (redirecting stdout to a file) is a bit slower than programs
redirecting output themselves (mostly due to a python wrapper necessary for
windows). That doesn't matter for most things, but errcodes.h is a dependency
of nearly everything, making it a bit faster seem worthwhile.

Medium term it might also be worth avoiding writing errcodes.h if its contents
didn't actually change, to avoid unnecessary recompilations.

Reviewed-by: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Discussion: https://postgr.es/m/5e216522-ba3c-f0e6-7f97-5276d0270029@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2bf626b714b5189d6041c228f74cdb769ea169fa

Modified Files
--------------
src/backend/utils/Makefile | 2 +-
src/backend/utils/generate-errcodes.pl | 30 +++++++++++++++++++++++++-----
src/tools/msvc/Solution.pm | 2 +-
3 files changed, 27 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-07-18 21:14:08 Re: pgsql: ecpg: Output dir, source dir, stamp file argument for preproc/*.
Previous Message Peter Eisentraut 2022-07-18 19:08:23 pgsql: Re-add SPICleanup for ABI compatibility in stable branch