I have this FOREIGN table:
CREATE FOREIGN TABLE global.t_shared (
key text,
value text
)
SERVER cypex_etcd
OPTIONS (rowid_column 'key');
If I SELECT:
SELECT *
FROM global.t_shared
WHERE key = '/gather/78';
Result:
-[ RECORD 1 ]------------------------------------------------------------------
key | /gather/78
value | {"host_id": 75, "host_url": "postgres://pg-eu-01:5432/db",
"gather_id": 78, "host_name": "pg-eu-01",
"gather_name": "collect_stats", "gather_debug": true,
"gather_purge": true, "gather_storage": "local",
"gather_wanted_status": "planned"}
This works well too:
SELECT key, value
FROM global.t_shared
WHERE key = '/gather/78';
Result:
-[ RECORD 1 ]------------------------------------------------------------------
key | /gather/78
value | {"host_id": 75, "host_url": "postgres://pg-eu-01:5432/db",
"gather_id": 78, "host_name": "pg-eu-01",
"gather_name": "collect_stats", "gather_debug": true,
"gather_purge": true, "gather_storage": "local",
"gather_wanted_status": "planned"}
But selecting only value (returns 0 rows)
SELECT value
FROM global.t_shared
WHERE key = '/gather/78';
Result:
UPDATE presents the same behavior:
cypex=# update global.t_shared set key=key, value = value::jsonb || jsonb_build_object('gather_status', 'active') where key = '/gather/84';
UPDATE 1
cypex=# update global.t_shared set value = value::jsonb || jsonb_build_object('gather_status', 'active') where key = '/gather/84';
UPDATE 0
I have this FOREIGN table:
If I SELECT:
Result:
This works well too:
Result:
But selecting only
value(returns 0 rows)Result:
UPDATE presents the same behavior: