summaryrefslogtreecommitdiff
path: root/src/include/parser/scansup.h
diff options
context:
space:
mode:
authorTom Lane2020-10-04 20:09:55 +0000
committerTom Lane2020-10-04 20:09:55 +0000
commit97b61448262eae5e1b4a631aeac63b11d902a474 (patch)
tree4f672fc955dcb1ff2da44753921c2f3fdd72de23 /src/include/parser/scansup.h
parent9081bddbd75e4e8994ca243c820ca63387bd33f7 (diff)
Make postgres.bki use the same literal-string syntax as postgresql.conf.
The BKI file's string quoting conventions were previously quite weird, perhaps as a result of repurposing a function built to scan single-quoted strings to scan double-quoted ones. Change to use the same rules as we use in GUC files, allowing some simplifications in genbki.pl and initdb.c. While at it, completely remove the backend's scanstr() function, which was essentially a duplicate of the string dequoting code in guc-file.l. Instead export that one (under a less generic name than it had) and let bootscanner.l use it. Now we can clarify that scansup.c exists only to support the main lexer. We could alternatively have removed GUC_scanstr, but this way seems better since the previous arrangement could mislead a reader into thinking that scanstr() had something to do with the main lexer's handling of string literals. Maybe it did once, but if so it was a long time ago. This patch does not bump catversion, since the initially-installed catalog contents don't change. Note however that successful initdb after applying this patch will require up-to-date postgres.bki as well as postgres and initdb executables. In passing, remove a bunch of very-long-obsolete #include's in bootparse.y and bootscanner.l. John Naylor Discussion: https://postgr.es/m/CACPNZCtDpd18T0KATTmCggO2GdVC4ow86ypiq5ENff1VnauL8g@mail.gmail.com
Diffstat (limited to 'src/include/parser/scansup.h')
-rw-r--r--src/include/parser/scansup.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/include/parser/scansup.h b/src/include/parser/scansup.h
index 7a6ee529ae0..5bc426660df 100644
--- a/src/include/parser/scansup.h
+++ b/src/include/parser/scansup.h
@@ -1,8 +1,7 @@
/*-------------------------------------------------------------------------
*
* scansup.h
- * scanner support routines. used by both the bootstrap lexer
- * as well as the normal lexer
+ * scanner support routines used by the core lexer
*
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@@ -15,8 +14,6 @@
#ifndef SCANSUP_H
#define SCANSUP_H
-extern char *scanstr(const char *s);
-
extern char *downcase_truncate_identifier(const char *ident, int len,
bool warn);