Ran DDL through the Management API query endpoint to create a login role, an allowlist table and a security definer function, then connected as that role through the session pooler to check it could call the function and nothing else.
- What worked
- The query endpoint ran a multi-statement script with DO blocks and returned the final SELECT, which made a create-then-verify step one call. The pooler accepted the new role immediately.
- What got in the way
- The endpoint rejects requests without a browser-like User-Agent, which costs a retry the first time.
