Skip to content

Commit

Permalink
update changelog and add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Mar 11, 2018
1 parent 68a9f19 commit 748fc18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Wrong data from Blob/Clob when mark/reset is used [PR 971](https://github.com/pgjdbc/pgjdbc/pull/971)
- Adjust XAException return codes for better compatibility with XA specification [PR 782](https://github.com/pgjdbc/pgjdbc/pull/782)
- Wrong results when single statement is used with different bind types[PR 1137](https://github.com/pgjdbc/pgjdbc/pull/1137)
- Support generated keys for WITH queries that miss RETURNING [PR 1138](https://github.com/pgjdbc/pgjdbc/pull/1138)

## [42.2.1] (2018-01-25)
### Known issues
Expand Down
Expand Up @@ -237,6 +237,20 @@ public void testWithInsertInsert() throws SQLException {
assertTrue(!rs.next());
}

@Test
public void testWithInsertSelect() throws SQLException {
assumeMinimumServerVersion(ServerVersion.v9_1);
Statement stmt = con.createStatement();
int count = stmt.executeUpdate(
"WITH x as (INSERT INTO genkeys(a,b,c) VALUES (1, 'a', 2) returning "+returningClause+") select * from x",
new String[]{"c", "b"});
assertEquals(1, count);
ResultSet rs = stmt.getGeneratedKeys();
assertTrue(rs.next());
assertCB1(rs);
assertTrue(!rs.next());
}

@Test
public void testDelete() throws SQLException {
Statement stmt = con.createStatement();
Expand Down

0 comments on commit 748fc18

Please sign in to comment.