feature request: add supoprt for hstore
It would be nice if hstore type was supported on PG protocol side. Possibly it could be translated into jsonb on spanner.
@redbaron Thanks for your request. Is there a specific reason that you would like this to be supported? Is there a specific tool or driver that requires this, or is there some other reason?
If hstore was supported, it would be almost a drop in replacement for the PostgreSQL app we have
If hstore was supported, it would be almost a drop in replacement for the PostgreSQL app we have
Could you elaborate a bit more on what support you would need? The reason that I'm asking is that:
-
hstoreis defined in an extension, which means that it does not have a fixedoid. We could add it to thepg_typetable that PGAdapter uses with a randomly chosen (but fixed)oid. That would enable tools/applications that readpg_typeto check whetherhstoreexists to work, and also allow them to send data to PGAdapter that it claims is of typehstore. - We could map those values of type
hstoretotextin PGAdapter.jsonbis not an option, ashstoreuses a different format thanjsonb, and I would expect an application that thinks that it is usinghstoreto use thehstoreformat. - There's no way for PGAdapter to detect that text data that is returned by Cloud Spanner should be returned as if it was
hstore. So I'm not sure that the client/application in this case would be able to handle that.
There would be no support for any of the hstore functions or operators. So something like SELECT h['a'] FROM mytable; would not work.