Skip to content

redis_link

Read-write PostgreSQL foreign data wrapper for Redis strings, hashes, and sets, with basic Redis Cluster support

redis_link · Read-write PostgreSQL foreign data wrapper for Redis strings, hashes, and sets, with basic Redis Cluster support

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100680redis_linkredis_link1.0FDWBSD-2-ClauseC

PostgreSQL · 16

Usage

Sources:

redis_link version 1.0 is a Redis foreign data wrapper tested upstream on PostgreSQL 16. It can scan Redis string, hash, and set data, handles Redis Cluster redirections, and supports INSERT; it does not implement UPDATE or DELETE callbacks.

Example

CREATE EXTENSION redis_link;
CREATE SERVER redis_server FOREIGN DATA WRAPPER redis_link
  OPTIONS (host_port '127.0.0.1:6379');
CREATE FOREIGN TABLE redis_items (name text, content text, expire integer)
  SERVER redis_server
  OPTIONS (key 'name', value 'content', prefix 'demo:', table_type 'string', ttl 'expire');
SELECT * FROM redis_items;

The validator accepts a password option, but the reviewed C implementation never consumes it, so do not assume authenticated Redis support. It constructs Redis commands by concatenating identifiers and row values and passes them through hiredis command formatting; spaces, percent signs, or untrusted data can change parsing or trigger memory-safety bugs. Use only on a tightly isolated, trusted Redis namespace and do not expose writes or option creation to application roles.

Table reader