zoukankan      html  css  js  c++  java
  • postgres schema访问权限设置


    查看schemas

    [postgres@node1 ~]$ /usr/pgsql-9.6/bin/psql  -h 51.0.1.213 -Ufire firedb

    查看schemas

    firedb=# dn+
    1604625808(1)

    firedb=# SELECT nspname FROM pg_namespace;


    Owner表示schemas 属于哪个用户,Access privileges 表示是否可以访问。


    授权schema

    firedb=# grant USAGE on SCHEMA big_emergency_auth to fire;
    GRANT


    1604626305(1)

    设置set search_path,这里是搜索路径,如果搜索路径没有这个SCHEMA 我们也无法查看到

    set search_path TO "$user",public,amp,apolloconfigdb


    查看当前SCHEMA

    firedb=# show search_path;

    "$user", public, amp, apolloconfigdb,


    查看表

    firedb=#

    firedb=# dt
                             List of relations
            Schema       |            Name             | Type  | Owner
    --------------------+-----------------------------+-------+-------
      amp                | amp_auth                    | table | fire
      amp                | amp_change_log              | table | fire
      amp                | amp_login_log               | table | fire
      amp                | amp_org                     | table | fire
      amp                | amp_org_personnel           | table | fire
      amp                | amp_pw_chg_type             | table | fire
      amp                | amp_role                    | table | fire
      amp                | amp_staff                   | table | fire
      amp                | amp_staff_auth              | table | fire
      amp                | amp_staff_org               | table | fire
      amp                | amp_staff_role              | table | fire
      amp                | ss_org                      | table | fire

    ……………………………….









  • 相关阅读:
    Java Arrays 的基础知识
    Java 基础知识
    C
    165. 小猫爬山 (dfs)
    164. 可达性统计
    数码 美团资格赛(整数分块)
    1079 中国剩余定理(模板)
    5814: 余数之和(整数分块)
    Greedy Sequence(主席树-区间小于每个数的最大值)
    XKC's basketball team(单调栈+二分)
  • 原文地址:https://www.cnblogs.com/menkeyi/p/13935660.html
Copyright © 2011-2022 走看看