-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PG13: same_schema needs porting #167
Comments
The same_schema test was fixed for PG12 in the meantime, but now PG13 is broken:
I've been staring that the code for some time, but can't make much sense of it. It seems the problem is that plpgsql isn't dropped properly in the 3rd test database, but inspecting the database manually didn't reveal any differences. |
Looks like the regexes aren't matching due to extra missing items being reported; i.e., the I assume that is output generated by the |
I'm wondering is this is related to fallout/cleanup from postgresql's 50fc694e43742ce3d04a5e9f708432cb022c5f0d, perhaps some changes in |
I did some more staring yesterday but didn't get very far. The first test difference is easily catched by accepting the extra 3 items (change "1" to "[14]", append /m to the regexp flags). |
Looks like this will fix the tests; not sure if it's sane or not: modified check_postgres.pl
@@ -1310,6 +1310,7 @@ JOIN pg_roles r ON (r.oid = l.lanowner)},
SQL2 => q{
SELECT l.*, lanname AS name
FROM pg_language l
+ exclude => 'system',
},
},
aggregate => { However, based on the actual code which handles the system exclusion, I'm not sure that this is a sensible test/fix. sub find_catalog_info {
...
if (exists $ci->{exclude}) {
if ('temp_schemas' eq $ci->{exclude}) {
if (! $opt{filtered}{system}) {
$SQL .= q{ WHERE nspname !~ '^pg_t'};
}
}
elsif ('system' eq $ci->{exclude}) {
if (! $opt{filtered}{system}) {
$SQL .= sprintf
q{ %s n.nspname !~ '^pg' AND n.nspname <> 'information_schema'},
$SQL =~ /WHERE/ ? 'AND' : 'WHERE';
}
}
else {
die "Unknown exclude '$ci->{exclude}' called";
}
}
...
} It does look like there is a lot of version-specific knowledge/fixes to the queries which pull the underlying catalog objects out, so this routine is probably where any such fix should go. |
The same_schema check needs rewriting for PG12:
Additionally, t/02_same_schema.t uses
WITH OIDS
which is gone in PG12. I suggest usingWITH (autovacuum_enabled = off)
instead there.The text was updated successfully, but these errors were encountered: