暂无图片
暂无图片
15
暂无图片
暂无图片
暂无图片

PG客户端工具测试连接openGauss

原创 多米爸比 2020-07-02
10626

openGauss自带客户端工具为gsql
本文使用常见的PG客户端工具测试连接openGauss

测试前准备

参考《openGauss 安装编译过程要点及问题解决》

注意:
1.设置password_encryption_type=0
2.不要使用omm用户进行测试

pgAdmin4

pgadmin4opengauss.png
对象可正常显示无报错,查询接口也可正常执行

psql(linux)+免密访问

og_linux.png

psql(windows)+免密访问

og_win.png

pgweb

openGausspgweb.png

jdbc+postgresql驱动

    public static void main(String[] args) {
        testLoadBalance();
    }
    public static void testLoadBalance() {
        for (int i = 0; i < 1000; i++) {
            try (Connection conn = DriverManager.getConnection(
                    "jdbc:postgresql://192.168.99.120:26000,192.168.99.122:26000/postgres?targetServerType=any&loadBalanceHosts=false",
                    "og_test", "OpenGauss2020")) {
                System.out.println("NO:" + i);
                //execSelect(conn);
                execInsert(conn);
            } catch (SQLException se) {
                System.out.println(se.getMessage());
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
            } // end try
        }
    }
原生的PG测试用例可正常运行,无异常。

结论

openGauss高度兼容PG,常见的PG客户端工具都可适用于openGauss。

最后修改时间:2022-12-13 12:06:14
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论