Skip to content
This repository was archived by the owner on Dec 22, 2025. It is now read-only.

Conversation

@reidab
Copy link
Contributor

@reidab reidab commented Oct 31, 2025

Since this August release, pg_dump has started including \restrict and \unrestrict lines in its output. These are psql meta commands meant to guard against dumps from untrusted systems triggering command execution on the local machine.

Klepto (via lib/pq) expects pg_dump output to be valid SQL and fails when run with newer versions.

This PR strips the restrict/unrestrict lines from pg_dump output prior to passing it along to the rest of the stack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant