PostgreSQLѧϰÊÖ²á(ϵͳ±í)(7)
À´Ô´£ºÎ´Öª ÔðÈα༣ºÔðÈα༠·¢±íʱ¼ä:2014-01-26 22:01¡¡µã»÷:´Î
¿ÚÁîʧЧʱ¼ä(Ö»ÓÃÓÚ¿ÚÁîÈÏÖ¤)£»Èç¹ûûÓÐʧЧÆÚ£¬ÔòΪNULL¡£
rolconfig text[] ÔËÐÐʱÅäÖñäÁ¿µÄ»á»°È±Ê¡¡£
¼ûÈçÏÂÓ¦ÓÃʾÀý£º
#´ÓÊä³ö½á¹û¿ÉÒÔ¿´³ö¿ÚÁî×Ö¶ÎÒѾ±»¼ÓÃÜ¡£
postgres=# SELECT rolname,rolpassword FROM pg_authid;
rolname | rolpassword
-----------+-------------------------------------
postgres | md5a3556571e93b0d20722ba62be61e8c2d
Îå¡¢pg_auth_members:
¸Ãϵͳ±í´æ´¢½ÇÉ«Ö®¼äµÄ³ÉÔ±¹Øϵ¡£
Ãû×Ö ÀàÐÍ ÒýÓà ÃèÊö
roleid oid pg_authid.oid ×é½ÇÉ«µÄID¡£
member oid pg_authid.oid ÊôÓÚ×é½ÇÉ«roleidµÄ³ÉÔ±½ÇÉ«µÄID¡£
grantor oid pg_authid.oid ¸³Óè´Ë³ÉÔ±¹ØϵµÄ½ÇÉ«µÄID¡£
admin_option bool Èç¹û¾ßÓаÑÆäËü³ÉÔ±½ÇÉ«¼ÓÈë×é½ÇÉ«µÄȨÏÞ£¬ÔòΪÕæ¡£
¼ûÈçÏÂÓ¦ÓÃʾÀý£º
#1. ÏȲ鿴½ÇÉ«³ÉÔ±±íÖÐÓÐÄÄЩ½ÇÉ«Ö®¼äµÄÁ¥Êô¹Øϵ£¬ÔÚµ±Ç°½á¹û¼¯ÖÐÖ»ÓÐÒ»¸ö³ÉÔ±½ÇÉ«Á¥ÊôÓÚÒ»¸ö×é½ÇÉ«£¬
# Èç¹ûÓжà¸ö³ÉÔ±½ÇÉ«Á¥ÊôÓÚͬһ¸ö×é½ÇÉ«£¬ÕâÑù½«»áÓжàÌõ¼Ç¼¡£
postgres=# SELECT * FROM pg_auth_members ;
roleid | member | grantor | admin_option
--------+--------+---------+--------------
16446 | 16445 | 10 | f
(1 row)
#2. ²é¿´×é½ÇÉ«µÄÃû×Ö¡£
postgres=# SELECT rolname FROM pg_authid a,pg_auth_members am WHERE a.oid = am.roleid; www.2cto.com
rolname
---------
mygroup
Ïà¹ØÐÂÎÅ>>
×îÐÂÍƼö¸ü¶à>>>
- ·¢±íÆÀÂÛ
-
- ×îÐÂÆÀÂÛ ¸ü¶à>>
Äú¿ÉÄܸÐÐËȤµÄÎÄÕÂ
ÐÂÎŹØ×¢ÅÅÐаñ
ÈÈÃÅÍƼö
×îÐÂÍƼö
±¾ÏµÁÐÎÄÕ·Òë×Ô¡¶50 Tips and Tricks for MongoDB Developers¡·£¬ÔÝʱûÓÐÕÒµ½ÖÐÎÄ[Ïêϸ]