DigitalChinaOpenSource / TiDB-for-PostgreSQL

PgSQL compatible on distributed database TiDB
Apache License 2.0
386 stars 21 forks source link

About client connect #3

Closed KevinYang19 closed 3 years ago

KevinYang19 commented 3 years ago

When I use Dbeaver Connect, It prompts for errors

[2021/06/10 17:15:23.988 +08:00] [INFO] [conn.go:788] ["command dispatched failed"] [conn=30] [connInfo="id:30, addr:10.7.10.115:55747 status:10, collation:gbk_chinese_ci, user:root"] [command=] [status="inTxn:0, autocommit:1"] [sql="\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u001bstandard_conforming_strings\u0000\u0000"] [txn_mode=OPTIMISTIC] [err="ERROR 1243 (HY000): Unknown prepared statement handler (%!(BADPREC)stmt_bind) given to %!s(MISSING)"]
[2021/06/10 17:15:23.988 +08:00] [INFO] [conn.go:788] ["command dispatched failed"] [conn=30] [connInfo="id:30, addr:10.7.10.115:55747 status:10, collation:gbk_chinese_ci, user:root"] [command=] [status="inTxn:0, autocommit:1"] [sql="P\u0000"] [txn_mode=OPTIMISTIC] [err="ERROR 1243 (HY000): Unknown prepared statement handler (%!(BADPREC)stmt_description) given to %!s(MISSING)"]
[2021/06/10 17:15:23.988 +08:00] [INFO] [conn.go:788] ["command dispatched failed"] [conn=30] [connInfo="id:30, addr:10.7.10.115:55747 status:10, collation:gbk_chinese_ci, user:root"] [command=] [status="inTxn:0, autocommit:1"] [sql="\u0000\u0000\u0000\u0000\u0000"] [txn_mode=OPTIMISTIC] [err="ERROR 1243 (HY000): Unknown prepared statement handler (%!(BADPREC)stmt_description) given to %!s(MISSING)"]
[2021/06/10 17:15:23.990 +08:00] [INFO] [conn.go:788] ["command dispatched failed"] [conn=30] [connInfo="id:30, addr:10.7.10.115:55747 status:10, collation:gbk_chinese_ci, user:root"] [command=] [status="inTxn:0, autocommit:1"] [sql="\u0000SELECT 1 FROM pg_catalog.pg_attribute s\nJOIN pg_catalog.pg_class p ON s.attrelid = p.oid\nJOIN pg_catalog.pg_namespace n ON p.relnamespace = n.oid\nWHERE p.relname = 'pg_type'\nAND n.nspname = 'pg_catalog'\nAND s.attname = 'typcategory'\u0000\u0000\u0000"] [txn_mode=OPTIMISTIC] [err="[schema:1146]Table 'pg_catalog.pg_attribute' doesn't exist\ngithub.com/pingcap/errors.AddStack\n\t/root/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\t/root/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:156\ngithub.com/pingcap/tidb/infoschema.(*infoSchema).TableByName\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/infoschema/infoschema.go:171\ngithub.com/pingcap/tidb/planner/core.(*preprocessor).handleTableName\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/planner/core/preprocess.go:937\ngithub.com/pingcap/tidb/planner/core.(*preprocessor).Leave\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/planner/core/preprocess.go:296\ngithub.com/pingcap/parser/ast.(*TableName).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:308\ngithub.com/pingcap/parser/ast.(*TableSource).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:445\ngithub.com/pingcap/parser/ast.(*Join).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:152\ngithub.com/pingcap/parser/ast.(*Join).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:152\ngithub.com/pingcap/parser/ast.(*TableRefsClause).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:626\ngithub.com/pingcap/parser/ast.(*SelectStmt).Accept\n\t/root/go/pkg/mod/github.com/!digital!china!open!source/!d!c!parser@v0.0.0-20210604102014-5a0758192631/ast/dml.go:972\ngithub.com/pingcap/tidb/planner/core.Preprocess\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/planner/core/preprocess.go:88\ngithub.com/pingcap/tidb/executor.(*PrepareExec).Next\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/executor/prepared.go:164\ngithub.com/pingcap/tidb/session.(*session).PrepareStmt\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/session/session.go:1292\ngithub.com/pingcap/tidb/server.(*TiDBContext).Prepare\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/server/driver_tidb.go:361\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmtPrepare\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/server/conn_stmt.go:60\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/server/conn.go:988\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/server/conn.go:773\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/root/go/src/github.com/digitalchina/TiDB-for-PostgreSQL/server/server.go:459\nruntime.goexit\n\t/usr/local/golang/go/src/runtime/asm_amd64.s:1371"]

port: 4000 user: root database: test I don't know the password,then I use the empty password

pupillord commented 3 years ago

Hi KevinYang19, Thank you for feecback! Password is empty when database is initialized. At present, tidb for pgsql is just in its infancy, and does not support various pgsql's system tables and functions, so using visual connection will report errors. If you want to experience it, you can use psql to connect, and need to run sql with mysql syntax