Packages
integratedb
0.1.0
IntegrateDB is a database sharing system. It provides integration primitives and data ownership and migration controls. Use it to integrate applications directly through a Postgres database.
Current section
Files
Jump to
Current section
Files
priv/sql/integratedb_sync.sql
-- Touches a UUID in the integratedb.sync table. This is picked up
-- by the replication listener as a cue to re-sync the claims (because
-- logical replication doesn't stream DDL changes).
CREATE FUNCTION integratedb_sync() RETURNS void
AS $$
BEGIN
INSERT INTO integratedb.sync (
uid
)
VALUES (
md5(random()::text || clock_timestamp()::text)::uuid
);
END;
$$ LANGUAGE plpgsql;