Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5XLE-00058A-HB for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Mar 2019 15:04:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5XKF-0002i5-8k for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Mar 2019 15:03:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5XKE-0002bU-RP for pgsql-hackers@lists.postgresql.org; Sun, 17 Mar 2019 15:03:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5XK8-0000u1-Fe for pgsql-hackers@postgresql.org; Sun, 17 Mar 2019 15:03:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2HF3Pn0003891; Sun, 17 Mar 2019 11:03:25 -0400 From: Tom Lane To: Andrew Dunstan cc: Alexander Korotkov , Jeff Janes , Nikita Glukhov , Tomas Vondra , Andres Freund , Oleg Bartunov , Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Robert Haas , Pavel Stehule Subject: Re: jsonpath In-reply-to: References: <20190130022826.of7w6xv5lbvzqxfp@alap3.anarazel.de> <957ee2ff-f9a6-0ba1-13e2-9c4d320f63ac@2ndquadrant.com> <67128b8b-2d80-9e51-20a8-9ac8e0e2243e@2ndquadrant.com> <32541.1552759144@sss.pgh.pa.us> <3448.1552759918@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Sun, 17 Mar 2019 10:00:44 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3884.1552835005.1@sss.pgh.pa.us> Date: Sun, 17 Mar 2019 11:03:25 -0400 Message-ID: <3890.1552835005@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: > Why are we installing the jsonpath_gram.h file? It's not going to be > used by anything else, is it? TBH, I'm not sure I see why we're > installing the scanner.h file either. As near as I can see, jsonpath_gram.h and jsonpath_scanner.h exist only for communication between jsonpath_gram.y and jsonpath_scan.l. Maybe we'd be better off handling that need by compiling the .l file as part of the .y file, as we used to do with the core lexer and still do with several others (cf comments for commit 72b1e3a21); then we wouldn't even have to generate these files much less install them. A quick look at jsonpath_scan.c shows that it's pretty innocent of the tricks we've learned over the years for flex/bison portability; in particular I see that it's #including before postgres.h, which is a no-no. So that whole area needs more review anyway. regards, tom lane