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匹马行天下之JavaSE核心技术——工具类
    微信小程序
    在express3里用ejs模版引擎时,如何使其支持'.html'后缀
    node
    webstorm常用快捷键
    Meta标签中的format-detection属性及含义
    使用console进行 性能测试 和 计算代码运行时间
    JS获取浏览器URL中查询字符串的参数
    jspm 简介
    vue2.0 keep-alive最佳实践
  • 原文地址:https://www.cnblogs.com/menkeyi/p/13935660.html
Copyright © 2011-2022 走看看