Re: build remaining Flex files standalone

From: Andres Freund <andres(at)anarazel(dot)de>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, pavel(dot)stehule(at)gmail(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: build remaining Flex files standalone
Date: 2022-09-04 18:17:59
Message-ID: 20220904181759.px6uosll6zbxcum5@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-09-04 12:16:10 +0700, John Naylor wrote:
> Pushed 01 and 02 separately, then squashed and pushed the rest.

Thanks a lot! It does look a good bit cleaner to me now.

I think, as a followup improvement, we should move gramparse.h to
src/backend/parser, and stop installing gram.h, gramparse.h. gramparse.h
already had this note:

* NOTE: this file is only meant to be included in the core parsing files,
* i.e., parser.c, gram.y, and scan.l.
* Definitions that are needed outside the core parser should be in parser.h.

What do you think?

I looked for projects including gramparse.h ([1], and found libpg-query, pgpool,
slony1 and oracfe:
- libpg-query, pgpool are partial copies of our code so will catch up when
they sync up,
- slony1's [2] is a configure check, one that long seems outdated, because it's
grepping for standard_conforming strings, which was moved out in 6566e37e027
in 2009.
- As far as I can tell oracfe's include in sqlscan.l is vistigial, it compiles
without it. And the include in parse_keywords.c is just required because it
needs to include parser/scanner.h.

Greetings,

Andres Freund

[1] https://codesearch.debian.net/search?q=gramparse.h&literal=1&perpkg=1
[2] https://git.postgresql.org/gitweb/?p=slony1-engine.git;a=blob;f=config/acx_libpq.m4;h=7653357c0a731e36ec637df5ab378832d9279c19;hb=HEAD#l530

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-09-04 18:42:54 Re: First draft of the PG 15 release notes
Previous Message Jonathan S. Katz 2022-09-04 17:41:59 Re: First draft of the PG 15 release notes