Skip to content

Fix PostgreSQL view cleanup in block tests - #1

Merged
marcusgreen merged 1 commit into
catalyst:MOODLE_405_STABLEfrom
cameron1729:fix-postgres-test-cleanup
Nov 14, 2026
Merged

marcusgreen merged 1 commit into
catalyst:MOODLE_405_STABLEfrom
cameron1729:fix-postgres-test-cleanup

Conversation

@cameron1729

@cameron1729 cameron1729 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

DATABASE is MySQL specific. Postgres has current_schema so we can use that.

This is not a proper portable fix; it's just enough to stop postgres complaining. A better idea would be to track the query IDs created by each test and call report_sql\local\sql\view::drop($id) during teardown. Unfortunately drop is not portable either so we would need to tweak that too.

@marcusgreen
marcusgreen merged commit 6e3622f into catalyst:MOODLE_405_STABLE Nov 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants