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

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









  • 相关阅读:
    selenium+java利用AutoIT实现文件上传
    java+selenium自动化遇到confirm弹窗,出现NoAlertPresentException: no alert open
    Appium遇到问题:
    selenium2+java切换窗口
    nodejs
    连续12天的加班工作总结-根据客户选择来生成后续表单页面
    最近三家公司面试的总结吐槽及一点点总结
    nodeJs-autoMerge
    nodeJs-autoBulid
    Angular 学习笔记——ng-Resource1
  • 原文地址:https://www.cnblogs.com/menkeyi/p/13935660.html
Copyright © 2011-2022 走看看