Skip to content

ts_json

Flatten JSON scalar values into text for full-text search

apod_fts · Flatten JSON scalar values into text for full-text search

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102122ts_jsonapod_fts1.0FTSMITC

Usage

Sources:

ts_json is a small helper from the APOD full-text-search demonstration. It traverses JSON/JSONB scalar values and joins their text with a chosen delimiter for a text-search pipeline.

Core Workflow

CREATE EXTENSION ts_json;
SELECT jsonb_values('{"title":"PostgreSQL","body":"database"}'::jsonb, ' ');

Operational Boundaries

json_values(json, text) and jsonb_values(jsonb, text) return text; the second argument is a delimiter, not a field name. Keys are omitted, while string, number, boolean and null values are included. The extension does not install the demonstration website, RUM indexes or text-search dictionaries.

It is a historical C extension with no current major-version matrix. Installation needs a superuser. No preload is required; validate behavior on the target PostgreSQL version before relying on the old source.

Table reader