]> granicus.if.org Git - postgresql/commitdiff
Move psql's psqlscan.l into src/fe_utils.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Mar 2016 00:28:47 +0000 (20:28 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Mar 2016 00:28:47 +0000 (20:28 -0400)
This completes (at least for now) the project of getting rid of ad-hoc
linkages among the src/bin/ subdirectories.  Everything they share is now
in src/fe_utils/ and is included from a static library at link time.

A side benefit is that we can restore the FLEX_NO_BACKUP check for
psqlscanslash.l.  We might need to think of another way to do that check
if we ever need to build two lexers with that property in the same source
directory, but there's no foreseeable reason to need that.

20 files changed:
src/backend/parser/scan.l
src/bin/pgbench/Makefile
src/bin/pgbench/exprscan.l
src/bin/pgbench/pgbench.h
src/bin/psql/.gitignore
src/bin/psql/Makefile
src/bin/psql/command.h
src/bin/psql/mainloop.c
src/bin/psql/mainloop.h
src/bin/psql/nls.mk
src/bin/psql/prompt.h
src/bin/psql/psqlscanslash.h
src/bin/psql/psqlscanslash.l
src/fe_utils/.gitignore [new file with mode: 0644]
src/fe_utils/Makefile
src/fe_utils/psqlscan.l [moved from src/bin/psql/psqlscan.l with 97% similarity]
src/include/fe_utils/psqlscan.h [moved from src/bin/psql/psqlscan.h with 64% similarity]
src/include/fe_utils/psqlscan_int.h [moved from src/bin/psql/psqlscan_int.h with 85% similarity]
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/clean.bat

index 8f2d075d4384daf19bfd47c860ae76f4be8431f7..4d905e6b94fab347659eb4df9287a8b8ee90f516 100644 (file)
@@ -6,7 +6,7 @@
  *
  * NOTE NOTE NOTE:
  *
- * The rules in this file must be kept in sync with psql's psqlscan.l!
+ * The rules in this file must be kept in sync with src/fe_utils/psqlscan.l!
  *
  * The rules are designed so that the scanner never has to backtrack,
  * in the sense that there is always a rule that can match the input
index e5d22c2e7c254a925e7095b564d9c6930293b3bc..5e608b654b9a3ea62f2efeaa202463d4e6c5cbf7 100644 (file)
@@ -7,10 +7,10 @@ subdir = src/bin/pgbench
 top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
-OBJS = pgbench.o exprparse.o psqlscan.o $(WIN32RES)
+OBJS = pgbench.o exprparse.o $(WIN32RES)
 
-override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) \
-       -I$(top_srcdir)/src/bin/psql $(CPPFLAGS)
+override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
+LDFLAGS += -L$(top_builddir)/src/fe_utils -lpgfeutils
 
 ifneq ($(PORTNAME), win32)
 override CFLAGS += $(PTHREAD_CFLAGS)
@@ -19,21 +19,12 @@ endif
 
 all: pgbench
 
-pgbench: $(OBJS) | submake-libpq submake-libpgport
+pgbench: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
        $(CC) $(CFLAGS) $^ $(libpq_pgport) $(PTHREAD_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 
 # exprscan is compiled as part of exprparse
 exprparse.o: exprscan.c
 
-# we import psqlscan.o as-is from psql
-submake-psqlscan:
-       $(MAKE) -C $(top_builddir)/src/bin/psql psqlscan.o
-
-psqlscan.o: | submake-psqlscan
-       rm -f $@ && $(LN_S) $(top_builddir)/src/bin/psql/psqlscan.o .
-
-.PHONY: submake-psqlscan
-
 distprep: exprparse.c exprscan.c
 
 install: all installdirs
index 825dacc0af3f944ccb1378ee444054c3f12cd33d..7120836f84073ea372564bd33001385b4f727813 100644 (file)
@@ -23,7 +23,7 @@
  *-------------------------------------------------------------------------
  */
 
-#include "psqlscan_int.h"
+#include "fe_utils/psqlscan_int.h"
 
 /* context information for reporting errors in expressions */
 static const char *expr_source = NULL;
index 101b0bdbf3bef5972ce9f054f0bc067e410db343..46350aace1009a5c9bb16cda3864156d75a9aa41 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef PGBENCH_H
 #define PGBENCH_H
 
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
 /*
  * This file is included outside exprscan.l, in places where we can't see
index 9de50c0a287006e622c492abe5713bb6403656b6..c2862b12d6211ba704cf72d2f521c4d675815fc1 100644 (file)
@@ -1,4 +1,3 @@
-/psqlscan.c
 /psqlscanslash.c
 /sql_help.h
 /sql_help.c
index 4e68e3ebdca486611af20e239392801b68fcbc5a..6220d0d620f8785cf85f9aff489dfcf214b638fa 100644 (file)
@@ -24,7 +24,7 @@ LDFLAGS += -L$(top_builddir)/src/fe_utils -lpgfeutils
 OBJS=  command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
        startup.o prompt.o variables.o large_obj.o describe.o \
        tab-complete.o \
-       sql_help.o psqlscan.o psqlscanslash.o \
+       sql_help.o psqlscanslash.o \
        $(WIN32RES)
 
 
@@ -39,20 +39,15 @@ sql_help.c: sql_help.h ;
 sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
        $(PERL) $< $(REFDOCDIR) $*
 
-psqlscan.c: FLEXFLAGS = -Cfe -p -p
-psqlscan.c: FLEX_NO_BACKUP=yes
-
 psqlscanslash.c: FLEXFLAGS = -Cfe -p -p
-# Ideally we'd check this, but parallel make causes problems:
-# psqlscanslash.c: FLEX_NO_BACKUP=yes
+psqlscanslash.c: FLEX_NO_BACKUP=yes
 
-# Latest flex causes warnings in these files.
+# Latest flex causes warnings in this file.
 ifeq ($(GCC),yes)
-psqlscan.o: CFLAGS += -Wno-error
 psqlscanslash.o: CFLAGS += -Wno-error
 endif
 
-distprep: sql_help.h psqlscan.c psqlscanslash.c
+distprep: sql_help.h psqlscanslash.c
 
 install: all installdirs
        $(INSTALL_PROGRAM) psql$(X) '$(DESTDIR)$(bindir)/psql$(X)'
@@ -70,4 +65,4 @@ clean distclean:
 # files removed here are supposed to be in the distribution tarball,
 # so do not clean them in the clean/distclean rules
 maintainer-clean: distclean
-       rm -f sql_help.h sql_help.c psqlscan.c psqlscanslash.c
+       rm -f sql_help.h sql_help.c psqlscanslash.c
index 4f0140fd5639355941a16187eefccfc203848590..8d37a3a676c19a9f4705411fabb427dd3e58c3a8 100644 (file)
@@ -9,7 +9,7 @@
 #define COMMAND_H
 
 #include "fe_utils/print.h"
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
 
 typedef enum _backslashResult
index 1eb5a2ec537ac5b0b5b5837f57cdc5d0212b9a30..37dfa4d0e3540e3a63fab1f1b13da5fe07fd6c37 100644 (file)
@@ -11,6 +11,7 @@
 #include "command.h"
 #include "common.h"
 #include "input.h"
+#include "prompt.h"
 #include "settings.h"
 
 #include "mb/pg_wchar.h"
index 5ee8dc7f63fa756f756b9042ae7a7a3aefcc412a..fd9723a25ce2dafdef53eac1a71d513deb2ad763 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef MAINLOOP_H
 #define MAINLOOP_H
 
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
 extern const PsqlScanCallbacks psqlscan_callbacks;
 
index b9a7992a4fa9cda603d26207a4270b459c08302a..917ac0fc742bdccfc143be20b6b967e5767db9b3 100644 (file)
@@ -2,10 +2,10 @@
 CATALOG_NAME     = psql
 AVAIL_LANGUAGES  = cs de es fr it ja pl pt_BR ru zh_CN zh_TW
 GETTEXT_FILES    = command.c common.c copy.c help.c input.c large_obj.c \
-                   mainloop.c psqlscan.c psqlscanslash.c startup.c \
+                   mainloop.c psqlscanslash.c startup.c \
                    describe.c sql_help.h sql_help.c \
                    tab-complete.c variables.c \
-                   ../../fe_utils/print.c \
+                   ../../fe_utils/print.c ../../fe_utils/psqlscan.c \
                    ../../common/exec.c ../../common/fe_memutils.c ../../common/username.c \
                    ../../common/wait_error.c
 GETTEXT_TRIGGERS = N_ psql_error simple_prompt
index 1f970a64f7ee1f4b9a3e4fd1ad5a943b7fe51740..d7e76dc181e35cb1474301e497d089c57b165721 100644 (file)
@@ -8,17 +8,8 @@
 #ifndef PROMPT_H
 #define PROMPT_H
 
-typedef enum _promptStatus
-{
-       PROMPT_READY,
-       PROMPT_CONTINUE,
-       PROMPT_COMMENT,
-       PROMPT_SINGLEQUOTE,
-       PROMPT_DOUBLEQUOTE,
-       PROMPT_DOLLARQUOTE,
-       PROMPT_PAREN,
-       PROMPT_COPY
-} promptStatus_t;
+/* enum promptStatus_t is now defined by psqlscan.h */
+#include "fe_utils/psqlscan.h"
 
 char      *get_prompt(promptStatus_t status);
 
index abc3700d001b5d073112b4c105610b64532e4576..48553647a905188bf9dbbf265fbeff37a436f9e7 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef PSQLSCANSLASH_H
 #define PSQLSCANSLASH_H
 
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
 
 /* Different ways for scan_slash_option to handle parameter words */
index a89ce15ad4cf366506790034742c7908a1556a44..e3e0db3b2fb50c9389f393a6912d73fe9647956a 100644 (file)
@@ -6,7 +6,7 @@
  *
  * XXX Avoid creating backtracking cases --- see the backend lexer for info.
  *
- * See psqlscan_int.h for additional commentary.
+ * See fe_utils/psqlscan_int.h for additional commentary.
  *
  * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
@@ -24,7 +24,7 @@
 }
 
 %{
-#include "psqlscan_int.h"
+#include "fe_utils/psqlscan_int.h"
 
 /*
  * We must have a typedef YYSTYPE for yylex's first argument, but this lexer
diff --git a/src/fe_utils/.gitignore b/src/fe_utils/.gitignore
new file mode 100644 (file)
index 0000000..37f5f75
--- /dev/null
@@ -0,0 +1 @@
+/psqlscan.c
index 3223f1f26c723d1bb676ce7332881516087d6507..9da03b196b5944107183af878f6f69aa64b3b2f3 100644 (file)
@@ -1,11 +1,13 @@
 #-------------------------------------------------------------------------
 #
-# Makefile
-#    Makefile for src/fe_utils
+# Makefile for src/fe_utils
 #
 # This makefile generates a static library, libpgfeutils.a,
 # for use by client applications
 #
+# Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
 # IDENTIFICATION
 #    src/fe_utils/Makefile
 #
@@ -17,7 +19,7 @@ include $(top_builddir)/src/Makefile.global
 
 override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
 
-OBJS = mbprint.o print.o simple_list.o string_utils.o
+OBJS = mbprint.o print.o psqlscan.o simple_list.o string_utils.o
 
 all: libpgfeutils.a
 
@@ -25,6 +27,16 @@ libpgfeutils.a: $(OBJS)
        rm -f $@
        $(AR) $(AROPT) $@ $^
 
+psqlscan.c: FLEXFLAGS = -Cfe -p -p
+psqlscan.c: FLEX_NO_BACKUP=yes
+
+# Latest flex causes warnings in this file.
+ifeq ($(GCC),yes)
+psqlscan.o: CFLAGS += -Wno-error
+endif
+
+distprep: psqlscan.c
+
 # libpgfeutils could be useful to contrib, so install it
 install: all installdirs
        $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
@@ -35,5 +47,10 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(libdir)/libpgfeutils.a'
 
-clean distclean maintainer-clean:
-       rm -f libpgfeutils.a $(OBJS)
+clean distclean:
+       rm -f libpgfeutils.a $(OBJS) lex.backup
+
+# psqlscan.c is supposed to be in the distribution tarball,
+# so do not clean it in the clean/distclean rules
+maintainer-clean: distclean
+       rm -f psqlscan.c
similarity index 97%
rename from src/bin/psql/psqlscan.l
rename to src/fe_utils/psqlscan.l
index 93c735596025aa0e960ca6bbd5866ccea58c6d02..55067b450c2141a0b2b6c5f21366ba9dc8bbd09b 100644 (file)
@@ -2,14 +2,20 @@
 /*-------------------------------------------------------------------------
  *
  * psqlscan.l
- *       lexical scanner for psql (and other frontend programs)
+ *       lexical scanner for SQL commands
  *
- * This code is mainly needed to determine where the end of a SQL statement
- * is: we are looking for semicolons that are not within quotes, comments,
- * or parentheses.  The most reliable way to handle this is to borrow the
- * backend's flex lexer rules, lock, stock, and barrel.  The rules below
- * are (except for a few) the same as the backend's, but their actions are
- * just ECHO whereas the backend's actions generally do other things.
+ * This lexer used to be part of psql, and that heritage is reflected in
+ * the file name as well as function and typedef names, though it can now
+ * be used by other frontend programs as well.  It's also possible to extend
+ * this lexer with a compatible add-on lexer to handle program-specific
+ * backslash commands.
+ *
+ * This code is mainly concerned with determining where the end of a SQL
+ * statement is: we are looking for semicolons that are not within quotes,
+ * comments, or parentheses.  The most reliable way to handle this is to
+ * borrow the backend's flex lexer rules, lock, stock, and barrel.  The rules
+ * below are (except for a few) the same as the backend's, but their actions
+ * are just ECHO whereas the backend's actions generally do other things.
  *
  * XXX The rules in this file must be kept in sync with the backend lexer!!!
  *
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       src/bin/psql/psqlscan.l
+ *       src/fe_utils/psqlscan.l
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres_fe.h"
 
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
 #include "libpq-fe.h"
 }
 
 %{
-#include "psqlscan_int.h"
+#include "fe_utils/psqlscan_int.h"
 
 /*
  * We must have a typedef YYSTYPE for yylex's first argument, but this lexer
@@ -54,8 +60,6 @@ typedef int YYSTYPE;
 #define LEXRES_BACKSLASH       2       /* backslash command start */
 
 
-static bool var_is_current_source(PsqlScanState state, const char *varname);
-
 #define ECHO psqlscan_emit(cur_state, yytext, yyleng)
 
 /*
@@ -703,7 +707,7 @@ other                       .
                                        if (value)
                                        {
                                                /* It is a variable, check for recursion */
-                                               if (var_is_current_source(cur_state, varname))
+                                               if (psqlscan_var_is_current_source(cur_state, varname))
                                                {
                                                        /* Recursive expansion --- don't go there */
                                                        cur_state->callbacks->write_error("skipping recursive expansion of variable \"%s\"\n",
@@ -1264,8 +1268,8 @@ psqlscan_select_top_buffer(PsqlScanState state)
  * Check if specified variable name is the source for any string
  * currently being scanned
  */
-static bool
-var_is_current_source(PsqlScanState state, const char *varname)
+bool
+psqlscan_var_is_current_source(PsqlScanState state, const char *varname)
 {
        StackElem  *stackelem;
 
similarity index 64%
rename from src/bin/psql/psqlscan.h
rename to src/include/fe_utils/psqlscan.h
index 4ff321866fccd48e4447b769a1a26596f60ab489..1f10ecc2d4461caaa9fecfdcabd8a3a68f33a451 100644 (file)
@@ -1,17 +1,27 @@
-/*
- * psql - the PostgreSQL interactive terminal
+/*-------------------------------------------------------------------------
  *
- * Copyright (c) 2000-2016, PostgreSQL Global Development Group
+ * psqlscan.h
+ *       lexical scanner for SQL commands
  *
- * src/bin/psql/psqlscan.h
+ * This lexer used to be part of psql, and that heritage is reflected in
+ * the file name as well as function and typedef names, though it can now
+ * be used by other frontend programs as well.  It's also possible to extend
+ * this lexer with a compatible add-on lexer to handle program-specific
+ * backslash commands.
+ *
+ *
+ * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/fe_utils/psqlscan.h
+ *
+ *-------------------------------------------------------------------------
  */
 #ifndef PSQLSCAN_H
 #define PSQLSCAN_H
 
 #include "pqexpbuffer.h"
 
-#include "prompt.h"
-
 
 /* Abstract type for lexer's internal state */
 typedef struct PsqlScanStateData *PsqlScanState;
@@ -25,6 +35,19 @@ typedef enum
        PSCAN_EOL                                       /* end of line, SQL possibly complete */
 } PsqlScanResult;
 
+/* Prompt type returned by psql_scan() */
+typedef enum _promptStatus
+{
+       PROMPT_READY,
+       PROMPT_CONTINUE,
+       PROMPT_COMMENT,
+       PROMPT_SINGLEQUOTE,
+       PROMPT_DOUBLEQUOTE,
+       PROMPT_DOLLARQUOTE,
+       PROMPT_PAREN,
+       PROMPT_COPY
+} promptStatus_t;
+
 /* Callback functions to be used by the lexer */
 typedef struct PsqlScanCallbacks
 {
similarity index 85%
rename from src/bin/psql/psqlscan_int.h
rename to src/include/fe_utils/psqlscan_int.h
index cdbf85d5b246e5b2102784ced2319301ad84d435..a52929d5abfec0c07cc18759ddeeb2c49dd5a1dc 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/*-------------------------------------------------------------------------
+ *
  * psqlscan_int.h
  *       lexical scanner internal declarations
  *
  * if we were using lexers with separate static state we would soon end up
  * with dangling buffer pointers in one or the other.  Also note that this
  * is unlikely to work very nicely if the lexers aren't all built with the
- * same flex version.
+ * same flex version, or if they don't use the same flex options.
+ *
+ *
+ * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
  *
- * Copyright (c) 2000-2016, PostgreSQL Global Development Group
+ * src/include/fe_utils/psqlscan_int.h
  *
- * src/bin/psql/psqlscan_int.h
+ *-------------------------------------------------------------------------
  */
 #ifndef PSQLSCAN_INT_H
 #define PSQLSCAN_INT_H
 
-#include "psqlscan.h"
+#include "fe_utils/psqlscan.h"
 
-/* This is just to allow this file to be compilable standalone */
+/*
+ * These are just to allow this file to be compilable standalone for header
+ * validity checking; in actual use, this file should always be included
+ * from the body of a flex file, where these symbols are already defined.
+ */
 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
 #define YY_TYPEDEF_YY_BUFFER_STATE
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void *yyscan_t;
+#endif
 
 /*
  * We use a stack of flex buffers to handle substitution of psql variables.
@@ -116,6 +129,8 @@ extern void psqlscan_push_new_buffer(PsqlScanState state,
                                                 const char *newstr, const char *varname);
 extern void psqlscan_pop_buffer_stack(PsqlScanState state);
 extern void psqlscan_select_top_buffer(PsqlScanState state);
+extern bool psqlscan_var_is_current_source(PsqlScanState state,
+                                                          const char *varname);
 extern YY_BUFFER_STATE psqlscan_prepare_buffer(PsqlScanState state,
                                                const char *txt, int len,
                                                char **txtcopy);
index 1cd8452f49ece27f9983b4597ce0d25a51109fe1..ebc2da8e8445f9ced29f1c660c4842ec761fff52 100644 (file)
@@ -63,16 +63,14 @@ my $frontend_extralibs = {
        'psql'       => ['ws2_32.lib'] };
 my $frontend_extraincludes = {
        'initdb' => ['src/timezone'],
-       'psql'   => [ 'src/backend' ],
-       'pgbench' => [ 'src/bin/psql' ] };
+       'psql'   => [ 'src/backend' ] };
 my $frontend_extrasource = {
-       'psql' => ['src/bin/psql/psqlscan.l', 'src/bin/psql/psqlscanslash.l'],
+       'psql' => [ 'src/bin/psql/psqlscanslash.l' ],
        'pgbench' =>
-         [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y',
-           'src/bin/psql/psqlscan.l' ] };
+         [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] };
 my @frontend_excludes = (
        'pgevent',     'pg_basebackup', 'pg_rewind', 'pg_dump',
-       'pg_xlogdump', 'scripts',       'pgbench');
+       'pg_xlogdump', 'scripts');
 
 sub mkvcbuild
 {
@@ -120,7 +118,7 @@ sub mkvcbuild
        our @pgcommonbkndfiles = @pgcommonallfiles;
 
        our @pgfeutilsfiles = qw(
-         mbprint.c print.c simple_list.c string_utils.c);
+         mbprint.c print.c psqlscan.l psqlscan.c simple_list.c string_utils.c);
 
        $libpgport = $solution->AddProject('libpgport', 'lib', 'misc');
        $libpgport->AddDefine('FRONTEND');
@@ -659,11 +657,6 @@ sub mkvcbuild
        }
        $pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c');
 
-       # fix up pgbench once it's been set up
-       # we're borrowing psqlscan.c from psql, so grab it from the correct place
-       my $pgbench = AddSimpleFrontend('pgbench');
-       $pgbench->ReplaceFile('src/bin/pgbench/psqlscan.c', 'src/bin/psql/psqlscan.c');
-
        $solution->Save();
        return $solution->{vcver};
 }
index ecf92700f28ef1c55a16f2308bce70ca7cc8f08a..469b8a24b29848127bb8a27a5cdc528910d04588 100755 (executable)
@@ -75,7 +75,7 @@ if exist src\pl\plperl\spi.c del /q src\pl\plperl\spi.c
 if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.c del /q src\pl\plpgsql\src\pl_gram.c
 if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.h del /q src\pl\plpgsql\src\pl_gram.h
 
-if %DIST%==1 if exist src\bin\psql\psqlscan.c del /q src\bin\psql\psqlscan.c
+if %DIST%==1 if exist src\fe_utils\psqlscan.c del /q src\fe_utils\psqlscan.c
 if %DIST%==1 if exist src\bin\psql\psqlscanslash.c del /q src\bin\psql\psqlscanslash.c
 
 if %DIST%==1 if exist contrib\cube\cubescan.c del /q contrib\cube\cubescan.c