mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
ae005fc582
pgRestore read the whole pg_restore --file script into one string to find TREK's migration table before clearing the schema. The script carries every COPY row of the dump, so a large database made the read exceed V8's maximum string length before the check ran, and the restore failed with an unhelpful error instead of loading or refusing. The check now streams the script with readline and stops at the first matching line. The match itself is unchanged: the same CREATE TABLE line for the same quoted schema, so a dump without TREK's history is still refused before anything is cleared. The regex's escaping is a named helper. PGTOOLS-005b pins that the script is never read whole.