forked from BRupireddy2/pg_synthesize_wal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpg_synthesize_wal--1.0.sql
37 lines (33 loc) · 976 Bytes
/
pg_synthesize_wal--1.0.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* contrib/pg_synthesize_wal/pg_synthesize_wal--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION pg_synthesize_wal" to load this file. \quit
--
-- pg_synthesize_wal_record()
--
-- Writes a synthesized message into WAL.
--
CREATE FUNCTION pg_synthesize_wal_record(IN size int8,
OUT lsn pg_lsn
)
AS 'MODULE_PATHNAME', 'pg_synthesize_wal_record'
LANGUAGE C STRICT PARALLEL UNSAFE;
--
-- pg_synthesize_wal_record()
--
-- Writes a user-supplied message in bytea form into WAL.
--
CREATE FUNCTION pg_synthesize_wal_record(IN data bytea,
OUT lsn pg_lsn
)
AS 'MODULE_PATHNAME', 'pg_synthesize_wal_record_bytea'
LANGUAGE C STRICT PARALLEL UNSAFE;
--
-- pg_synthesize_wal_record()
--
-- Writes a user-supplied message in text form into WAL.
--
CREATE FUNCTION pg_synthesize_wal_record(IN data text,
OUT lsn pg_lsn
)
AS 'MODULE_PATHNAME', 'pg_synthesize_wal_record_text'
LANGUAGE C STRICT PARALLEL UNSAFE;