Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pyrseas needs to ignore system schemas pg_* #37

Closed
andreypopp opened this Issue · 4 comments

2 participants

@andreypopp

I found that recent version of Pyrseas tries to manage system schemas like pg_temp. They are should be ignored.

@jmafc
Owner

Could you please be more specific, in particular, Postgres version and type of object? A small testcase would be ideal.

There are 20 modules in pyrseas/dbobject and nearly all restrict on nspname != 'pg_catalog' AND nspname != 'information_schema' already. If I'm not mistaken, schema.py and dbtype.py are the only ones where I found it necessary to also restrict to exclude some additional pg_ schemas (see change 8d92dd8). I believe a blanket restriction, like nspname != 'information_schema AND nspname NOT LIKE 'pg_%'`, could cause issues later (for PG extensions, we've already had to include pg_catalog because languages are now extensions under that schema).

@andreypopp

PostgreSQL 9.1, Pyrseas installed from git.

I get the following error:

ProgrammingError: unacceptable schema name "pg_temp_8"
DETAIL:  The prefix "pg_" is reserved for system schemas.

will try to produce a test case later.

@andreypopp

Ah, it seems you exclude pg_temp_1, but PostgreSQL creates such tables as needed, so you also need to exclude pg_temp_X for X from [1..]. Same for pg_toast_temp_*.

@jmafc
Owner

OK, I'll work on adding the extra restrictions to pyrseas/dbobject/schema.py only.

@jmafc jmafc closed this in 77039da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.