-
-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
Problem
The file convention for running version specific pg_regress test files makes testing harder. It needs extra files and duplicate queries. Which also adds noise when reviewing PR diffs. See an example here.
Solution
We can reuse the supautils convention instead, essentially:
create table dummy();
NOTICE: the event trigger is executed for rolecreator
NOTICE: transforming rolecreator to superuser
<PG_GE_16>
ERROR: permission denied to alter role
DETAIL: Only roles with the SUPERUSER attribute may change the SUPERUSER attribute.
</PG_GE_16>
<PG_GE_14>
ERROR: must be superuser to alter superuser roles or change superuser attribute
</PG_GE_14>
<PG_GE_13>
ERROR: must be superuser to alter superusers
</PG_GE_13>
CONTEXT: SQL statement "alter role rolecreator superuser"
PL/pgSQL function become_super() line 4 at SQL statement
(https://github.com/supabase/supautils/blob/master/test/expected/event_triggers.out.in#L148-L162)
This means we have test.out.in
files with conditional blocks, that are then processed before being used as input for pg_regress
.
With this we eliminate query duplication and extra files.
There might be a simpler solution. TBD.
Metadata
Metadata
Assignees
Labels
No labels