pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bootstrap: pure parser and reentrant scanner
Date: Thu, 19 Dec 2024 14:51:03 +0000
Message-ID: <E1tOHri-000MrA-T3@gemulon.postgresql.org> (raw)

bootstrap: pure parser and reentrant scanner

Use the flex %option reentrant and the bison option %pure-parser to
make the generated scanner and parser pure, reentrant, and
thread-safe.

Make the generated scanner use palloc() etc. instead of malloc() etc.

For the bootstrap scanner and parser, reentrancy and memory management
aren't that important, but we make this change here anyway so that all
the scanners and parsers in the backend use a similar set of options
and APIs.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Andreas Karlsson <andreas@proxel.se>
Discussion: https://www.postgresql.org/message-id/flat/eb6faeac-2a8a-4b69-9189-c33c520e5b7b@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e4bacb171001644583ac14e29ae1b09ce818c92

Modified Files
--------------
src/backend/bootstrap/bootparse.y   |  9 ++--
src/backend/bootstrap/bootscanner.l | 91 +++++++++++++++++++++++++------------
src/backend/bootstrap/bootstrap.c   |  6 ++-
src/include/bootstrap/bootstrap.h   | 12 +++--
4 files changed, 80 insertions(+), 38 deletions(-)



Message-ID: <E1tOHri-000MrA-T3@gemulon.postgresql.org>
Permalink:  ../E1tOHri-000MrA-T3@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tOHri-000MrA-T3@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: bootstrap: pure parser and reentrant scanner
  In-Reply-To: <E1tOHri-000MrA-T3@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox