postgresql/src/include
Peter Eisentraut db6856c991 syncrep parser: 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.
Previously, we only used palloc() for the buffer, but flex would still
use malloc() for its internal structures.  Now, all the memory is
under palloc() control.

Simplify flex scan buffer management: Instead of constructing the
buffer from pieces and then using yy_scan_buffer(), we can just use
yy_scan_string(), which does the same thing internally.

The previous code was necessary because we allocated the buffer with
palloc() and the rest of the state was handled by malloc().  But this
is no longer the case; everything is under palloc() now.

Use flex yyextra to handle context information, instead of global
variables.  This complements the other changes to make the scanner
reentrant.

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
2024-12-24 18:05:06 +01:00
..
access Fix race condition in TupleDescCompactAttr assert code 2024-12-24 14:54:24 +13:00
archive Add macro for customizing an archiving WARNING message. 2024-03-04 15:41:42 -06:00
backup Align blocks in incremental backups to BLCKSZ 2024-04-05 16:30:01 +02:00
bootstrap bootstrap: pure parser and reentrant scanner 2024-12-19 15:37:44 +01:00
catalog Remove pg_attribute.attcacheoff column 2024-12-20 23:22:37 +13:00
commands Print out error position for CREATE DOMAIN 2024-12-16 14:52:11 +09:00
common Remove pgrminclude annotations 2024-12-24 11:49:07 +01:00
datatype Update copyright for 2024 2024-01-03 20:49:05 -05:00
executor Get rid of old version of BuildTupleHashTable(). 2024-12-19 18:07:00 -05:00
fe_utils Fix incorrect source filename references 2024-12-23 19:41:49 +13:00
foreign Clean up more indent breakage from 6377e12a5. 2024-04-16 13:00:40 -04:00
jit jit: Remove obsolete LLVM version guard. 2024-11-11 12:07:24 +13:00
lib Include necessary header files in radixtree.h. 2024-12-09 13:07:06 -08:00
libpq Remove pgrminclude annotations 2024-12-24 11:49:07 +01:00
mb Inline basic UTF-8 functions. 2024-03-20 09:40:57 -07:00
nodes Convert SetOp to read its inputs as outerPlan and innerPlan. 2024-12-19 16:23:45 -05:00
optimizer Improve planner's handling of SetOp plans. 2024-12-19 17:02:25 -05:00
parser Track more precisely query locations for nested statements 2024-10-24 09:29:54 +09:00
partitioning Revert support for ALTER TABLE ... MERGE/SPLIT PARTITION(S) commands 2024-08-24 18:48:48 +03:00
pch Update copyright for 2024 2024-01-03 20:49:05 -05:00
port Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
portability Fix datatypes in comments in instr_time.h 2024-08-06 22:15:55 +03:00
postmaster Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
regex Avoid assertion due to disconnected NFA sub-graphs in regex parsing. 2024-11-15 18:23:38 -05:00
replication syncrep parser: pure parser and reentrant scanner 2024-12-24 18:05:06 +01:00
rewrite Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
snowball Remove pgrminclude annotations 2024-12-24 11:49:07 +01:00
statistics Add functions pg_restore_relation_stats(), pg_restore_attribute_stats(). 2024-10-24 12:08:00 -07:00
storage Fix corruption when relation truncation fails. 2024-12-20 23:57:02 +13:00
tcop Set the stack_base_ptr in main(), not in random other places. 2024-12-17 12:08:42 -05:00
tsearch Remove ts_locale.c's lowerstr() 2024-12-17 14:04:55 +01:00
utils Mark CatalogSnapshotData static 2024-12-20 19:37:50 +02:00
.gitignore Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
c.h Fix header inclusion order in c.h. 2024-12-05 14:31:39 +13:00
fmgr.h Remove _PG_fini() 2024-08-21 07:24:03 +09:00
funcapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
getopt_long.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
meson.build Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
miscadmin.h Set the stack_base_ptr in main(), not in random other places. 2024-12-17 12:08:42 -05:00
pg_config.h.in Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
pg_config_manual.h Add prefetching support on macOS 2024-08-28 07:28:27 +02:00
pg_getopt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_trace.h Remove pgrminclude annotations 2024-12-24 11:49:07 +01:00
pgstat.h Add backend-level statistics to pgstats 2024-12-19 13:19:22 +09:00
pgtar.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgtime.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
port.h More use of getpwuid_r() directly 2024-09-02 09:04:30 +02:00
postgres.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
postgres_ext.h Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
postgres_fe.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
varatt.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
windowapi.h Update copyright for 2024 2024-01-03 20:49:05 -05:00