Redshift:如何列出组中的所有用户 [英] Redshift: How to list all users in a group

查看:36
本文介绍了Redshift:如何列出组中的所有用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Redshift 中获取属于某个组的用户列表似乎是一项相当常见的任务,但我不知道如何解释 grolist 字段中的 BLOB.

Getting the list of users belonging to a group in Redshift seems to be a fairly common task but I don't know how to interpret BLOB in grolist field.

我确实从 TeamSQL 的 grolist 字段中获得了BLOB".不太确定这是否特定于 TeamSQL,但我记得我之前在其他工具中获得了一个 ID 列表

I am literally getting "BLOB" in grolist field from TeamSQL. Not so sure this is specific to TeamSQL but I kind of remember thatI got a list of IDs there instead previously in other tool

推荐答案

这对我有用:

select usename from pg_user , pg_group  where
pg_user.usesysid = ANY(pg_group.grolist) and 
pg_group.groname='<YOUR_GROUP_NAME>';

这篇关于Redshift:如何列出组中的所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆