Use pg_temp to store PostgreSQL auto provisioning procedures#44255
Use pg_temp to store PostgreSQL auto provisioning procedures#44255gabrielcorado merged 6 commits intomasterfrom
pg_temp to store PostgreSQL auto provisioning procedures#44255Conversation
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
| procName := storedProcedureName(pid, match[storedProcedureRe.SubexpIndex("Schema")], match[storedProcedureRe.SubexpIndex("ProcName")]) | ||
| var argsCount int | ||
| args := strings.Split(match[storedProcedureRe.SubexpIndex("Args")], ",") | ||
| for _, arg := range args { | ||
| // Skip arguments that have a default value. | ||
| if !strings.Contains(strings.ToLower(arg), "default") { | ||
| argsCount++ |
There was a problem hiding this comment.
On one hand, it's quite impressive to validate things like this, but on the other hand, I feel it's too much custom mock logic. I would prefer something simpler but i don't mind keep this either.
What's more important is we cover these in our E2E tests. I see both RDS and Redshift auto-user provisioning passed so we are good 👍
There was a problem hiding this comment.
on that topic, could you check if E2E tests need to be updated (like do we need to adjust the permissions given to the admin user)?
|
@gabrielcorado See the table below for backport results.
|
Related to #37609.
This moves the auto user provisioning procedures to the temporary schema
pg_temp, similar to what is used for database access controls.Note: This doesn't update how procedures are stored for RedShift (they are still created without specifying the schema). This will be done in a separate PR.
In addition, the tests now also check the procedure presence (asserting per session in case of
pg_tempusage) and the argument count on the calls.changelog: Moved PostgreSQL auto provisioning users procedures to
pg_tempschema.