8000 Add clarification in README.md · postgrespro/pg_variables@0055ca3 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 /react-partial>

Commit 0055ca3

Browse files
Add clarification in README.md
1 parent d888a73 commit 0055ca3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,15 @@ SELECT pgv_get('pack','var_int', NULL::int);
335335
ERROR: unrecognized variable "var_int"
336336
COMMIT;
337337
```
338+
Also you cannot undo removing variable by `ROLLBACK`:
339+
```sql
340+
SELECT pgv_set('pack', 'var_int', 122, true);
341+
BEGIN;
342+
SELECT pgv_free();
343+
ROLLBACK;
344+
SELECT pgv_get('pack', 'var_int', NULL::int);
345+
ERROR: unrecognized package "pack"
346+
```
338347
If you created transactional variable once, you should use flag `is_transactional`
339348
every time when you want to change variable value by functions `pgv_set()`,
340349
`pgv_insert()` and deprecated setters (i.e. `pgv_set_int()`). If you try to

0 commit comments

Comments
 (0)
0