Skip to content

Commit 9980a95

Browse files
authored
Revert "fix: fix testGetSQLTypeQueryCache by searching for xid type. (#2805)" (#2807)
This reverts commit fad8664.
1 parent fad8664 commit 9980a95

11 files changed

Lines changed: 27 additions & 95 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- '.travis/**'
1313
pull_request:
1414
branches:
15-
- '**'
15+
- '*'
1616
paths-ignore:
1717
- 'docs/**'
1818
- '**/*.md'

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can search on The Central Repository with GroupId and ArtifactId [org.postgr
4141
[mvn-search]: https://search.maven.org/artifact/org.postgresql/postgresql "Search on Maven Central"
4242

4343
#### Development snapshots
44-
Snapshot builds (builds from `master` branch) are also deployed to OSS Sonatype Snapshot Repository, so you can test current development version (test some bugfix) by enabling the repository and using the latest [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/postgresql/postgresql/) version.
44+
Snapshot builds (builds from `master` branch) are also deployed to OSS Sonatype Snapshot Repository, so you can test current development version (test some bugfix) by enabling the repository and using the latest [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/postgresql/postgresql/maven-metadata.xml) version.
4545

4646
There are also available (snapshot) binary RPMs in [Fedora's Copr repository](https://copr.fedorainfracloud.org/coprs/g/pgjdbc/pgjdbc-travis/).
4747

‎docs/content/changelogs/2021-12-22-log4j.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: PostgreSQL JDBC Driver Log4j CVE status
33
date: 2021-12-22 20:32:25 +0000
4-
version: Log4J CVE Notice
4+
version: all
55
---
66

77
#### CVE-2021-44228 status

‎docs/content/changelogs/2023-01-31-42.5.2-release.md‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ fix: improve thread safety of PgResultSet#getTimestamp [PR #2726](https://github
3131
**Commits by author**
3232

3333
Dave Cramer (2):
34-
- fix: binary conversion of (very) long numeric values (longer than 4 * 2^15 digits) [PR #2697](https://github.com/pgjdbc/pgjdbc/pull/2697)\
35-
- fix: Apply patch from [Issue #2683](https://github.com/pgjdbc/pgjdbc/issues/2683) provided by James Courtney to fix hanging ssl connections [PR #2687](https://github.com/pgjdbc/pgjdbc/pull/2687)\
34+
- fix: binary conversion of (very) long numeric values (longer than 4 * 2^15 digits) [PR #2697](https://github.com/pgjdbc/pgjdbc/pull/2697)
35+
- fix: Apply patch from [Issue #2683](https://github.com/pgjdbc/pgjdbc/issues/2683) provided by James Courtney to fix hanging ssl connections [PR #2687](https://github.com/pgjdbc/pgjdbc/pull/2687)
3636
- fix: Make sure socket is closed if an exception is thrown in createSocket fixes [Issue #2684](https://github.com/pgjdbc/pgjdbc/issues/2684) [PR #2685](https://github.com/pgjdbc/pgjdbc/pull/2685)
3737

3838
Sebastian Baumhekel(1): <sebastian.baumhekel@gmail.com>
@@ -41,9 +41,3 @@ Sebastian Baumhekel(1): <sebastian.baumhekel@gmail.com>
4141
sz-liva(1):
4242
- fix: improve thread safety of PgResultSet#getTimestamp [PR #2726](https://github.com/pgjdbc/pgjdbc/pull/2726) fixes [Issue #2723](https://github.com/pgjdbc/pgjdbc/issues/2723)
4343

44-
Sebastian Baumhekel(1): <sebastian.baumhekel@gmail.com>
45-
- feat: Define binary transfer for custom types dynamically/automatically fixes [Issue #2554](https://github.com/pgjdbc/pgjdbc/issues/2554) [PR #2556](https://github.com/pgjdbc/pgjdbc/pull/2556)
46-
47-
sz-liva(1):
48-
- fix: improve thread safety of PgResultSet#getTimestamp [PR #2726](https://github.com/pgjdbc/pgjdbc/pull/2726) fixes [Issue #2723](https://github.com/pgjdbc/pgjdbc/issues/2723)
49-

‎docs/content/documentation/server-prepare.md‎

Lines changed: 17 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -412,28 +412,29 @@ import java.sql.*;
412412
public class ServerSidePreparedStatement {
413413

414414
public static void main(String args[]) throws Exception {
415-
415+
Class.forName("org.postgresql.Driver");
416416
String url = "jdbc:postgresql://localhost:5432/test";
417-
try (Connection conn = DriverManager.getConnection(url, "test", "")){
417+
Connection conn = DriverManager.getConnection(url, "test", "");
418418

419-
try (PreparedStatement pstmt = conn.prepareStatement("SELECT ?")){
419+
PreparedStatement pstmt = conn.prepareStatement("SELECT ?");
420420

421-
// cast to the pg extension interface
422-
org.postgresql.PGStatement pgstmt = pstmt.unwrap(org.postgresql.PGStatement.class);
421+
// cast to the pg extension interface
422+
org.postgresql.PGStatement pgstmt = pstmt.unwrap(org.postgresql.PGStatement.class);
423423

424-
// on the third execution start using server side statements
425-
pgstmt.setPrepareThreshold(3);
424+
// on the third execution start using server side statements
425+
pgstmt.setPrepareThreshold(3);
426426

427-
for (int i = 1; i <= 5; i++) {
428-
pstmt.setInt(1, i);
429-
boolean usingServerPrepare = pgstmt.isUseServerPrepare();
430-
ResultSet rs = pstmt.executeQuery();
431-
rs.next();
432-
System.out.println("Execution: " + i + ", Used server side: " + usingServerPrepare + ", Result: " + rs.getInt(1));
433-
rs.close();
434-
}
435-
}
427+
for (int i = 1; i <= 5; i++) {
428+
pstmt.setInt(1, i);
429+
boolean usingServerPrepare = pgstmt.isUseServerPrepare();
430+
ResultSet rs = pstmt.executeQuery();
431+
rs.next();
432+
System.out.println("Execution: " + i + ", Used server side: " + usingServerPrepare + ", Result: " + rs.getInt(1));
433+
rs.close();
436434
}
435+
436+
pstmt.close();
437+
conn.close();
437438
}
438439
}
439440
```
@@ -915,64 +916,3 @@ The following types of arrays support binary representation in requests and can
915916
|`boolean[]` , `Boolean[]` | `bool[]` | `bool[]`|
916917
|`String[]` | `varchar[]` , `text[]` | `varchar[]`|
917918
|`byte[][]` | `bytea[]` | `bytea[]`|
918-
919-
920-
## CopyManager
921-
The driver provides an extension for accessing `COPY`. Copy is an extension that PostreSQL provides. see [Copy](https://www.postgresql.org/docs/current/sql-copy.html)
922-
923-
#### Example 9.15 Copying Data in
924-
```java
925-
926-
/*
927-
* DDL for code below
928-
* create table copytest (stringvalue text, intvalue int, numvalue numeric(5,2));
929-
*/
930-
private static String[] origData =
931-
{"First Row\t1\t1.10\n",
932-
"Second Row\t2\t-22.20\n",
933-
"\\N\t\\N\t\\N\n",
934-
"\t4\t444.40\n"};
935-
private int dataRows = origData.length;
936-
private String sql = "COPY copytest FROM STDIN";
937-
938-
try (Connection con = DriverManager.getConnection(url, "postgres", "somepassword")){
939-
createTempTable(con, "copytest", "stringvalue text, intvalue int, numvalue numeric(5,2)");
940-
PGConnection pgConnection = con.unwrap(org.postgresql.PGConnection.class);
941-
CopyManager copyAPI = pgConnection.getCopyAPI();
942-
CopyIn cp = copyAPI.copyIn(sql);
943-
944-
for (String anOrigData : origData) {
945-
byte[] buf = anOrigData.getBytes();
946-
cp.writeToCopy(buf, 0, buf.length);
947-
}
948-
949-
long updatedRows = cp.endCopy();
950-
long handledRowCount = cp.getHandledRowCount();
951-
System.err.println(String.format("copy Updated %d Rows, and handled %d rows", updatedRows, handledRowCount));
952-
953-
int rowCount = getCount(con);
954-
System.err.println(rowCount);
955-
956-
}
957-
958-
```
959-
960-
#### Example 9.16 Copying Data out
961-
962-
```java
963-
String sql = "COPY copytest TO STDOUT";
964-
try (Connection con = DriverManager.getConnection(url, "postgres", "somepassword")){
965-
PGConnection pgConnection = con.unwrap(org.postgresql.PGConnection.class);
966-
CopyManager copyAPI = pgConnection.getCopyAPI();
967-
CopyOut cp = copyAPI.copyOut(sql);
968-
int count = 0;
969-
byte[] buf; // This is a relatively simple example. buf will contain rows from the database
970-
971-
while ((buf = cp.readFromCopy()) != null) {
972-
count++;
973-
}
974-
long rowCount = cp.getHandledRowCount();
975-
}
976-
```
977-
978-
More examples can be found in the [Copy Test Code](https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/test/java/org/postgresql/test/jdbc2/CopyTest.java)

‎docs/content/download/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ date: 2022-06-20T01:17:28+05:30
44
draft: false
55
---
66

7-
Binary JAR file downloads of the JDBC driver are available here and the current version with Maven Repository. Because Java is platform neutral, it is a simple process of just downloading the appropriate JAR file and dropping it into your classpath. Source versions are also available here for recent driver versions. Latest [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/postgresql/postgresql/) versions.
7+
Binary JAR file downloads of the JDBC driver are available here and the current version with Maven Repository. Because Java is platform neutral, it is a simple process of just downloading the appropriate JAR file and dropping it into your classpath. Source versions are also available here for recent driver versions.
88

99
## Latest Versions
1010

‎docs/content/license/_index.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: "License"
33
date: 2022-06-19T22:46:55+05:30
44
draft: false
5-
aliases:
6-
- "/about/license.html"
75
---
86

97
Copyright (c) 1997, PostgreSQL Global Development Group

‎docs/layouts/changelogs/list.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ <h1>
77
{{ range .Data.Pages.ByDate.Reverse }}
88
<ul>
99
<li>
10-
<a href="{{.Permalink}}"> {{.Params.Version}}</a>
10+
<h5>{{.Title}}</h5>
11+
<a href="{{.Permalink}}"> NOTES</a>
1112
</li>
1213
</ul>
1314
{{ end }}

‎docs/static/images/slonik_duke.png‎

-14.1 KB
Binary file not shown.

‎pgjdbc/src/test/java/org/postgresql/core/OidValuesCorrectnessTest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public class OidValuesCorrectnessTest extends BaseTest4 {
6161
* Helps in situation when variable name in Oid class isn't the same as typname in pg_type table.
6262
*/
6363
private static Map<String, String> oidTypeNames = new HashMap<String, String>() {{
64-
put("BOX_ARRAY", "_BOX");
6564
put("INT2_ARRAY", "_INT2");
6665
put("INT4_ARRAY", "_INT4");
6766
put("INT8_ARRAY", "_INT8");

0 commit comments

Comments
 (0)