sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.63k stars 732 forks source link

Support CockroachDB #235

Closed tamird closed 7 years ago

tamird commented 7 years ago

It'd be awesome if pgweb could support CRDB! I did some basic testing but things failed pretty quickly.

After fixing #234, I ran into the following problems with the startup query:

SELECT
  session_user, # invalid syntax: statement ignored: unimplemented at or near "session_user"
  current_user, # invalid syntax: statement ignored: unimplemented at or near "current_user"
  current_database(), # supported!
  current_schemas(false), # supported!
  inet_client_addr(), # pq: unknown function: inet_client_addr()
  inet_client_port(), # pq: unknown function: inet_client_port()
  inet_server_addr(), # pq: unknown function: inet_server_addr()
  inet_server_port(), # pq: unknown function: inet_server_port()
  version() # supported, returns "CockroachDB CCL eb8f08f3a (darwin amd64, built 2017/04/29 20:46:22, go1.8.1)"

Fixing these is beyond my knowledge of pgweb, but I'd be happy to help from the CRDB side if you're interested in adding support.

Cheers!

sosedoff commented 7 years ago

@tamird do you have a sample cockroachdb database dump that i can use for testing?

tamird commented 7 years ago

@sosedoff you can easily test against just an empty CockroachDB database for now (even that doesn't work). We have a library that makes it easy to programmatically run a CockroachDB process: https://godoc.org/github.com/cockroachdb/cockroach-go/testserver

sosedoff commented 7 years ago

@tamird i'd happy to support cockroachdb, but i personally don't use it and don't think i can find any spare time to really dig in and implement a such a bridge. Pgweb does not have any active contributors so its kind of hard to say when non-postres stores could be supported.

casoetan commented 6 years ago

No plans for this yet?

fire commented 6 years ago

Looks supported in Cockroachdb 2. https://github.com/cockroachdb/cockroach/pull/23334