extern so DispatchAgent can use this (postgres.c) */
| 535 | |
| 536 | /* extern so DispatchAgent can use this (postgres.c) */ |
| 537 | extern void |
| 538 | SetSessionUserId(Oid userid, bool is_superuser) |
| 539 | { |
| 540 | AssertState(SecurityRestrictionContext == 0); |
| 541 | AssertArg(OidIsValid(userid)); |
| 542 | SessionUserId = userid; |
| 543 | SessionUserIsSuperuser = is_superuser; |
| 544 | SetRoleIsActive = false; |
| 545 | |
| 546 | /* We force the effective user IDs to match, too */ |
| 547 | OuterUserId = userid; |
| 548 | CurrentUserId = userid; |
| 549 | } |
| 550 | |
| 551 | bool |
| 552 | IsAuthenticatedUserSuperUser() |
no outgoing calls