pg-redis-fdw / redis_fdw

A PostgreSQL foreign data wrapper for Redis
497 stars 68 forks source link

Geo as a tabletype #15

Open neovintage opened 8 years ago

neovintage commented 8 years ago

Now that Redis 3.2 is out, it would be cool to be able to update geospacial items based upon a singleton key. I'm thinking there'd have to be serious limitations to this because the table used to insert values based on the geo coordinates wouldn't be the same one that you'd use to read. Although, I think this would be inline w/ the zset functionality since that's what stores the data underlying the geo commands in redis.

Example Experience:

CREATE FOREIGN TABLE myredis_geo (value text, lat double, long double)
    SERVER redis_server
    OPTIONS (database '0', tabletype 'geo', singleton_key 'mygeo');

INSERT INTO myredis_geo (value, lat, long) VALUES ("Palermo", 13.361389, 38.115556);
adunstan commented 7 years ago

If someone wants to send a patch I will look at it. I don't have time to work on it.