~ubuntu-branches/ubuntu/utopic/postgresql-9.4/utopic-security

« back to all changes in this revision

Viewing changes to contrib/test_decoding/sql/decoding_into_rel.sql

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, CVE-2014-8161
  • Date: 2015-02-06 12:31:46 UTC
  • mfrom: (1.1.5) (7.1.2 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20150206123146-vtmf30jbkm7w16p8
Tags: 9.4.1-0ubuntu0.14.10
* New upstream security/bug fix release (LP: #1418928)
  - Fix buffer overruns in to_char() [CVE-2015-0241]
  - Fix buffer overruns in contrib/pgcrypto [CVE-2015-0243]
  - Fix possible loss of frontend/backend protocol synchronization after an
    error [CVE-2015-0244]
  - Fix information leak via constraint-violation error messages
    [CVE-2014-8161]
  - See release notes for details about other fixes:
    http://www.postgresql.org/about/news/1569/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- test that we can insert the result of a get_changes call into a
 
2
-- logged relation. That's really not a good idea in practical terms,
 
3
-- but provides a nice test.
 
4
 
 
5
-- predictability
 
6
SET synchronous_commit = on;
 
7
 
 
8
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
 
9
 
 
10
-- slot works
 
11
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 
12
 
 
13
-- create some changes
 
14
CREATE TABLE somechange(id serial primary key);
 
15
INSERT INTO somechange DEFAULT VALUES;
 
16
 
 
17
CREATE TABLE changeresult AS
 
18
    SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 
19
 
 
20
SELECT * FROM changeresult;
 
21
 
 
22
INSERT INTO changeresult
 
23
    SELECT data FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 
24
INSERT INTO changeresult
 
25
    SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 
26
 
 
27
SELECT * FROM changeresult;
 
28
DROP TABLE changeresult;
 
29
DROP TABLE somechange;
 
30
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 
31
SELECT 'stop' FROM pg_drop_replication_slot('regression_slot');