mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-22 00:30:19 +02:00
harden backup system schema filtering
This commit is contained in:
1 parent
19c71ca39a
commit
8e25be699c
1 file changed
+3
-3
@@ -239,9 +239,9 @@ function tableKey(schemaName: string, tableName: string): string {
|
||||
}
|
||||
|
||||
function nonSystemSchemaPredicate(identifier: string): string {
|
||||
return `${identifier} NOT IN ('pg_catalog', 'information_schema')
|
||||
AND ${identifier} NOT LIKE 'pg_toast%'
|
||||
AND ${identifier} NOT LIKE 'pg_temp_%'`;
|
||||
// PostgreSQL reserves pg_ prefixes for system schemas, including temp/toast variants.
|
||||
return `${identifier} <> 'information_schema'
|
||||
AND ${identifier} NOT LIKE 'pg\\_%' ESCAPE '\\'`;
|
||||
}
|
||||
|
||||
function hasBackupTransforms(opts: RunDatabaseBackupOptions): boolean {
|
||||
|
||||
Reference in new issue
Block a user