diff --git a/CHANGES b/CHANGES index 8937183..37e5442 100644 --- a/CHANGES +++ b/CHANGES @@ -11,3 +11,11 @@ 2022-08-29 Version 1.0.4 - Removed %jd from all format strings, using %lld everywhere for 64 bit integers + +2022-12-07 Version 1.0.5 + +- PostgreSQL 14 support + +2023-08-26 Version 1.0.6 + +- PostrgeSQL 15 support diff --git a/README.md b/README.md index da8e259..fb5d0fc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This project is currently work in progress and may have experience significant c **PostgreSQL version compatibility** -Currently tested against PostgreSQL 9.4+, 10, 11, 12, 13 and 14. Other versions might work but unconfirmed. +Currently tested against PostgreSQL 9.4+, 10, 11, 12, 13, 14 and 15. Other versions might work but unconfirmed. ## Building ### Dependencies: diff --git a/redis_fdw--1.0.5--1.0.6.sql b/redis_fdw--1.0.5--1.0.6.sql new file mode 100644 index 0000000..1d8874c --- /dev/null +++ b/redis_fdw--1.0.5--1.0.6.sql @@ -0,0 +1,9 @@ +CREATE OR REPLACE FUNCTION redis_fdw_handler() + RETURNS fdw_handler + AS 'MODULE_PATHNAME' + LANGUAGE C STRICT; + +CREATE OR REPLACE FUNCTION redis_fdw_validator(text[], oid) + RETURNS void + AS 'MODULE_PATHNAME' + LANGUAGE C STRICT; diff --git a/redis_fdw--1.0.6.sql b/redis_fdw--1.0.6.sql new file mode 100644 index 0000000..36789d2 --- /dev/null +++ b/redis_fdw--1.0.6.sql @@ -0,0 +1,13 @@ +CREATE FUNCTION redis_fdw_handler() + RETURNS fdw_handler + AS 'MODULE_PATHNAME' + LANGUAGE C STRICT; + +CREATE FUNCTION redis_fdw_validator(text[], oid) + RETURNS void + AS 'MODULE_PATHNAME' + LANGUAGE C STRICT; + +CREATE FOREIGN DATA WRAPPER redis_fdw + HANDLER redis_fdw_handler + VALIDATOR redis_fdw_validator; diff --git a/redis_fdw.c b/redis_fdw.c index 1f2d2d6..2bf23ce 100644 --- a/redis_fdw.c +++ b/redis_fdw.c @@ -1375,7 +1375,11 @@ get_psql_columns(Oid foreigntableid, struct redis_fdw_ctx *rctx) DefElem *def = (DefElem *)lfirst(option); if (strcmp(def->defname, OPT_REDIS) == 0) { +#if PG_VERSION_NUM < 150000 colname = ((Value *)(def->arg))->val.str; +#else + colname = ((String *)(def->arg))->sval; +#endif DEBUG((DEBUG_LEVEL, "table %s column remapped (%s) -> (%s)", tablename, NameStr(att_tuple->attname), colname)); @@ -3440,7 +3444,11 @@ redisAddForeignUpdateTargets( DefElem *def = (DefElem *)lfirst(option); if (strcmp(def->defname, OPT_REDIS) == 0) { +#if PG_VERSION_NUM < 150000 colname = ((Value *)(def->arg))->val.str; +#else + colname = ((String *)(def->arg))->sval; +#endif DEBUG((DEBUG_LEVEL, "column remapped (%s) -> (%s)", NameStr(att->attname), colname)); diff --git a/redis_fdw.control b/redis_fdw.control index 3bcf8e1..d8b485f 100644 --- a/redis_fdw.control +++ b/redis_fdw.control @@ -1,5 +1,5 @@ comment = 'foreign-data wrapper for Redis' -default_version = '1.0.5' +default_version = '1.0.6' module_pathname = '$libdir/redis_fdw' relocatable = true diff --git a/rw_redis_fdw.spec b/rw_redis_fdw.spec index acd1281..1867a59 100644 --- a/rw_redis_fdw.spec +++ b/rw_redis_fdw.spec @@ -1,4 +1,4 @@ -%define redis_fdw_ver 1.0.5 +%define redis_fdw_ver 1.0.6 %define postgresql_ver 11 Summary: Redis FDW for PostgreSQL %{postgresql_ver} @@ -45,6 +45,12 @@ export PATH=/usr/pgsql-%{postgresql_ver}/bin:$PATH %{_prefix}/pgsql-11/share/extension/redis_fdw.control %changelog +* Sat Aug 26 2023 p +- PostreSQL 15 support +* Wed Dec 07 2022 Andrei Chistyakov +- PostreSQL 14 support +* Mon Aug 29 2022 Dmitri Dorofeev +- Removed %jd from all format strings, using %lld everywhere for 64 bit integers * Thu Feb 11 2021 Dmitri Dorofeev - Fix redisCommand() format string, it does not support %jd, so we are using %ld * Thu Jul 16 2020 Andrei Surgutanov