我是靠谱客的博主 欣慰电源,这篇文章主要介绍postgresql连接到schema,现在分享给大家,希望可以做个参考。


连接到postgresql

psql --username=platrw --port=5432  --host=10.19.141.87 -d postgres
用户名库名
创建用户:CREATE USER bi WITH PASSWORD '123456qwer'
djp01djp01
创建schemaCREATE SCHEMA dim;
重命名schemaalter schema djp02 rename to djp03;
禁用public  revoke create on schema public from public;
更改默认的schema

show search_path

create schema my_schema

grant all on schema my_schema to my_user;

set search_path to my_schema;

 alter search_path to my_schema;

连接时需要将postgresql默认的驱动版本更新到9.4

连接到sechema
<url>jdbc:postgresql://10.1.200.217:5432/lagouBI?currentSchema=lagoutest</url>
<user>postgres</user>
<password>postgres_test</password>

最后

以上就是欣慰电源最近收集整理的关于postgresql连接到schema的全部内容,更多相关postgresql连接到schema内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(115)

评论列表共有 0 条评论

立即
投稿
返回
顶部