williamdclt
03/16/2023, 2:20 PMzed import
? Whether using Zed, the SpiceDB binary or anything else. Would be tremendously useful for me to skip a whole bunch of data importsql
SELECT
CASE
WHEN userset_relation = '...' THEN
CONCAT("namespace", ':', object_id, '#', relation, '@', userset_namespace, ':', userset_object_id)
ELSE
CONCAT("namespace", ':', object_id, '#', relation, '@', userset_namespace, ':', userset_object_id, '#', userset_relation)
END
FROM relation_tuple
WHERE deleted_xid = '9223372036854775807'::xid8;
Would this WHERE condition do what I want? I don't necessarily need perfectly up-to-date relations (it'd be outdated in seconds anyway), just vaguely up-to-date.
Performance isn't really a concern, I'd run it on a copy of the live databasecorkrean
03/16/2023, 2:47 PM