1. postgresql 新创建的库和表授权命令

*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO liujunfan;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO caoxingquan;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO gukaiwei;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO huangpeisi;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO huangrixiong;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO liujiahao;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO ouyuanhui;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO liujiahao;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO yebowei;" 
*/20 * * * * /usr/bin/psql -d  tenant_1011046 -q -t -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO xiejun;" 

 2. 增加唯一键约束

test=# alter table tbl_unique add constraint uk_tbl_unique_a_b unique (a,b);
ALTER TABLE

 

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-10-06
  • 2021-07-30
  • 2022-12-23
  • 2021-09-26
  • 2022-03-08
猜你喜欢
  • 2021-09-15
  • 2021-11-20
  • 2022-12-23
  • 2021-11-22
  • 2022-02-16
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案