mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
524cfad23f
the new timetravel.c, new timetravel.README (cut from spi/README and modified), modified timetravel.sql.in and modified timetravel.example. Features: - optionally 3 parameter for insert/update/delete user name - work with CREATE UNIQUE INDEX ixxx on table xxx (unique_field,time_off); (the original version was work with unique index on 6.5.0-6.5.3, and not work on 7.3.2,7.3.3) (before 6.5.0 and between 6.5.3 and 7.3.2 I dont know) - get_timetravel(tablename) function for check timetravel-status. - timetravel trigger not change oid of the active record. (it is not a good feature, because the old version is automatice prevent the paralel update with "where oid=nnn") B?jthe Zolt?n
20 lines
446 B
MySQL
20 lines
446 B
MySQL
-- Adjust this setting to control where the objects get created.
|
|
SET search_path = public;
|
|
|
|
SET autocommit TO 'on';
|
|
|
|
CREATE OR REPLACE FUNCTION timetravel()
|
|
RETURNS trigger
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE 'C';
|
|
|
|
CREATE OR REPLACE FUNCTION set_timetravel(name, int4)
|
|
RETURNS int4
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE 'C' WITH (isStrict);
|
|
|
|
CREATE OR REPLACE FUNCTION get_timetravel(name)
|
|
RETURNS int4
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE 'C' WITH (isStrict);
|