cloudspannerecosystem / spanner-cli

Interactive command line tool for Cloud Spanner
Apache License 2.0
230 stars 28 forks source link

PostgreSQL dialect support #177

Open apstndb opened 4 months ago

apstndb commented 4 months ago

While this is a high hanging fruit and I don't think it's a highly demanded feature, there is a room to support the PostgreSQL database dialect with native RPC(not PostgreSQL wire protocol).

yfuruyama commented 4 months ago

I'm not sure if supporting PostgreSQL dialect in spanner-cli is a good approach.

We can use PGAdapter to use psql against Cloud Spanner database, so it should be able to cover most of the statements in PostgreSQL dialect.

apstndb commented 4 months ago

I have reconsidered potential usecases of this feature.

I suspect that psql with PGAdapter does not support Cloud Spanner's native execution plans. Therefore, it seems that spanner-cli's PostgreSQL interface support has value as a plan viewer.

Of course, this is not a high priority feature, but I think there are use cases that I haven't imagined yet, so I think it's best to leave this issue open.