Skip to content

Commit

Permalink
update docs and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
paolochiodi committed Jul 14, 2020
1 parent 1be0ca8 commit 6ba58c7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# 0.4.0 - 2020/7/14

- Breaking change: the versioning function is not quoting and escaping the name of the history table. Any name that needs quoting (upper case, special chars) should be provided as parameters already quoted and escaped.

# 0.3.0 - 2020/7/14

- Add parameter to ignore updates without actual changes
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Temporal Tables

_Version: 0.3.0_
_Version: 0.4.0_

This is an attempt to rewrite the postgresql [temporal_tables](https://github.com/arkhipov/temporal_tables) extension in PL/pgSQL, without the need for external c extension.

Expand Down Expand Up @@ -66,6 +66,11 @@ FOR EACH ROW EXECUTE PROCEDURE versioning(
);
```

A note on the history table name. Previous versions of this extension quoted and escaped it before usage.
Starting version 0.4.0 we are not escaping it anymore and users need to provide the escaped version as a parameter to the trigger.

This is consistent with the c version, simplifies the extension code and fixes an issue with upper case names that weren't properly supported.

Now test with some data:

```sql
Expand Down
2 changes: 1 addition & 1 deletion versioning_function.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DECLARE
holder2 record;
pg_version integer;
BEGIN
-- version 0.3.0
-- version 0.4.0

IF TG_WHEN != 'BEFORE' OR TG_LEVEL != 'ROW' THEN
RAISE TRIGGER_PROTOCOL_VIOLATED USING
Expand Down
2 changes: 1 addition & 1 deletion versioning_function_nochecks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DECLARE
transaction_info txid_snapshot;
existing_range tstzrange;
BEGIN
-- version 0.3.0
-- version 0.4.0

sys_period := TG_ARGV[0];
history_table := TG_ARGV[1];
Expand Down

0 comments on commit 6ba58c7

Please sign in to comment.