Line data Source code
1 : /// Schemas of the database system rather than of the user
2 1 : const SYSTEM_SCHEMAS = new Set(['information_schema', 'pg_catalog']);
3 : /// Prefixes of schemas of the database system, e.g. pg_toast or pg_temp_3
4 1 : const SYSTEM_SCHEMA_PREFIXES = ['pg_toast', 'pg_temp'];
5 :
6 : /// Is a schema part of the database system rather than of the user?
7 1 : export function isSystemSchema(schemaName: string): boolean {
8 1 : const lower = schemaName.toLowerCase();
9 1 : return SYSTEM_SCHEMAS.has(lower) || SYSTEM_SCHEMA_PREFIXES.some(prefix => lower.startsWith(prefix));
10 1 : }
|