first commit for openGauss connector jdbc
This commit is contained in:
189
CHANGELOG.md
Normal file
189
CHANGELOG.md
Normal file
@ -0,0 +1,189 @@
|
||||
# Changelog
|
||||
Notable changes since version 42.0.0, read the complete [History of Changes](https://jdbc.postgresql.org/documentation/changelog.html).
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
|
||||
### Added
|
||||
|
||||
### Fixed
|
||||
|
||||
## [42.2.5] (2018-08-27)
|
||||
### Changed
|
||||
- `ssl=true` implies `sslmode=verify-full`, that is it requires valid server certificate [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
|
||||
### Added
|
||||
- Support for `sslmode=allow/prefer/require` [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
|
||||
### Fixed
|
||||
- Security: added server hostname verification for non-default SSL factories in `sslmode=verify-full` (CVE-2018-10936) [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
- Updated documentation on SSL configuration [fa032732](https://github.com/pgjdbc/pgjdbc/commit/fa032732acfe51c6e663ee646dd5c1beaa1af857)
|
||||
- Updated Japanese translations [PR 1275](https://github.com/pgjdbc/pgjdbc/pull/1275)
|
||||
- IndexOutOfBounds on prepared multistatement with insert values [c2885dd0](https://github.com/pgjdbc/pgjdbc/commit/c2885dd0cfc793f81e5dd3ed2300bb32476eb14a)
|
||||
|
||||
## [42.2.4] (2018-07-14)
|
||||
### Changed
|
||||
- PreparedStatement.setNull(int parameterIndex, int t, String typeName) no longer ignores the typeName
|
||||
argument if it is not null [PR 1160](https://github.com/pgjdbc/pgjdbc/pull/1160)
|
||||
|
||||
### Fixed
|
||||
- Fix treatment of SQL_TSI_YEAR, SQL_TSI_WEEK, SQL_TSI_MINUTE [PR 1250](https://github.com/pgjdbc/pgjdbc/pull/1250)
|
||||
- Map integrity constraint violation to XA_RBINTEGRITY instead of XAER_RMFAIL [PR 1175](https://github.com/pgjdbc/pgjdbc/pull/1175) [f2d1352c](https://github.com/pgjdbc/pgjdbc/commit/f2d1352c2b3ea98492beb6127cd6d95039a0b92f)
|
||||
|
||||
## [42.2.3] (2018-07-12)
|
||||
### Known issues
|
||||
- SQL_TSI_YEAR is treated as hour, SQL_TSI_WEEK is treated as hour, SQL_TSI_MINUTE is treated as second
|
||||
|
||||
### Changed
|
||||
- Reduce the severity of the error log messages when an exception is re-thrown. The error will be
|
||||
thrown to caller to be dealt with so no need to log at this verbosity by pgjdbc [PR 1187](https://github.com/pgjdbc/pgjdbc/pull/1187)
|
||||
- Deprecate Fastpath API [PR 903](https://github.com/pgjdbc/pgjdbc/pull/903)
|
||||
- Support parenthesis in {oj ...} JDBC escape syntax [PR 1204](https://github.com/pgjdbc/pgjdbc/pull/1204)
|
||||
- ubenchmark module moved pgjdbc/benchmarks repository due to licensing issues [PR 1215](https://github.com/pgjdbc/pgjdbc/pull/1215)
|
||||
- Include section on how to submit a bug report in CONTRIBUTING.md [PR 951](https://github.com/pgjdbc/pgjdbc/pull/951)
|
||||
|
||||
### Fixed
|
||||
- getString for PGObject-based types returned "null" string instead of null [PR 1154](https://github.com/pgjdbc/pgjdbc/pull/1154)
|
||||
- Field metadata cache can be disabled via databaseMetadataCacheFields=0 [PR 1052](https://github.com/pgjdbc/pgjdbc/pull/1152)
|
||||
- Properly encode special symbols in passwords in BaseDataSource [PR 1201](https://github.com/pgjdbc/pgjdbc/pull/1201)
|
||||
- Adjust date, hour, minute, second when rounding nanosecond part of a timestamp [PR 1212](https://github.com/pgjdbc/pgjdbc/pull/1212)
|
||||
- perf: reduce memory allocations in query cache [PR 1227](https://github.com/pgjdbc/pgjdbc/pull/1227)
|
||||
- perf: reduce memory allocations in SQL parser [PR 1230](https://github.com/pgjdbc/pgjdbc/pull/1230), [PR 1233](https://github.com/pgjdbc/pgjdbc/pull/1233)
|
||||
- Encode URL parameters in BaseDataSource [PR 1201](https://github.com/pgjdbc/pgjdbc/pull/1201)
|
||||
- Improve JavaDoc formatting [PR 1236](https://github.com/pgjdbc/pgjdbc/pull/1236)
|
||||
|
||||
## [42.2.2] (2018-03-15)
|
||||
### Added
|
||||
- Documentation on server-side prepared statements [PR 1135](https://github.com/pgjdbc/pgjdbc/pull/1135)
|
||||
|
||||
### Fixed
|
||||
- Avoid failure for `insert ... on conflict...update` for `reWriteBatchedInserts=true` case [PR 1130](https://github.com/pgjdbc/pgjdbc/pull/1130)
|
||||
- fix: allowEncodingChanges should allow set client_encoding=... [PR 1125](https://github.com/pgjdbc/pgjdbc/pull/1125)
|
||||
- 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)
|
||||
- Support generated keys when INSERT/UPDATE/DELETE keyword is followed by a comment [PR 1138](https://github.com/pgjdbc/pgjdbc/pull/1138)
|
||||
|
||||
## [42.2.1] (2018-01-25)
|
||||
### Known issues
|
||||
- client_encoding has to be UTF8 even with allowEncodingChanges=true
|
||||
|
||||
### Changed
|
||||
- socksProxyHost is ignored in case it contains empty string [PR 1079](https://github.com/pgjdbc/pgjdbc/pull/1079)
|
||||
|
||||
### Fixed
|
||||
- Avoid connection failure when `DateStyle` is set to `ISO` (~PgBouncer) [Issue 1080](https://github.com/pgjdbc/pgjdbc/issues/1080)
|
||||
- Package scram:client classes, so SCRAM works when using a shaded jar [PR 1091](https://github.com/pgjdbc/pgjdbc/pull/1091) [1a89290e](https://github.com/pgjdbc/pgjdbc/commit/1a89290e110d5863b35e0a2ccf79e4292c1056f8)
|
||||
- reWriteBatchedInserts=true causes syntax error with ON CONFLICT [Issue 1045](https://github.com/pgjdbc/pgjdbc/issues/1045) [PR 1082](https://github.com/pgjdbc/pgjdbc/pull/1082)
|
||||
- Avoid failure in getPGArrayType when stringType=unspecified [PR 1036](https://github.com/pgjdbc/pgjdbc/pull/1036)
|
||||
- For PostgreSQL 9.0+ return a complete list of keywords in DatabaseMetadata.getSQLKeywords() from pg_catalog.pg_get_keywords(). [PR 940](https://github.com/pgjdbc/pgjdbc/pull/940)
|
||||
|
||||
## [42.2.0] (2018-01-17)
|
||||
### Known issues
|
||||
- SCRAM does not work as scram:client library is not packaged
|
||||
- client_encoding has to be UTF8 even with allowEncodingChanges=true
|
||||
|
||||
### Added
|
||||
- Support SCRAM-SHA-256 for PostgreSQL 10 in the JDBC 4.2 version (Java 8+) using the Ongres SCRAM library. [PR 842](https://github.com/pgjdbc/pgjdbc/pull/842)
|
||||
- Make SELECT INTO and CREATE TABLE AS return row counts to the client in their command tags. [Issue 958](https://github.com/pgjdbc/pgjdbc/issues/958) [PR 962](https://github.com/pgjdbc/pgjdbc/pull/962)
|
||||
- Support Subject Alternative Names for SSL connections. [PR 952](https://github.com/pgjdbc/pgjdbc/pull/952)
|
||||
- Support isAutoIncrement metadata for PostgreSQL 10 IDENTITY column. [PR 1004](https://github.com/pgjdbc/pgjdbc/pull/1004)
|
||||
- Support for primitive arrays [PR#887](https://github.com/pgjdbc/pgjdbc/pull/887) [3e0491a](https://github.com/pgjdbc/pgjdbc/commit/3e0491ac3833800721b98e7437635cf6ab338162)
|
||||
- Implement support for get/setNetworkTimeout() in connections. [PR 849](https://github.com/pgjdbc/pgjdbc/pull/849)
|
||||
- Make GSS JAAS login optional, add an option "jaasLogin" [PR 922](https://github.com/pgjdbc/pgjdbc/pull/922) see [Connecting to the Database](https://jdbc.postgresql.org/documentation/head/connect.html)
|
||||
|
||||
### Changed
|
||||
- Improve behaviour of ResultSet.getObject(int, Class). [PR 932](https://github.com/pgjdbc/pgjdbc/pull/932)
|
||||
- Parse CommandComplete message using a regular expresion, allows complete catch of server returned commands for INSERT, UPDATE, DELETE, SELECT, FETCH, MOVE, COPY and future commands. [PR 962](https://github.com/pgjdbc/pgjdbc/pull/962)
|
||||
- Use 'time with timezone' and 'timestamp with timezone' as is and ignore the user provided Calendars, 'time' and 'timestamp' work as earlier except "00:00:00" now maps to 1970-01-01 and "24:00:00" uses the system provided Calendar ignoring the user-provided one [PR 1053](https://github.com/pgjdbc/pgjdbc/pull/1053)
|
||||
- Change behaviour of multihost connection. The new behaviour is to try all secondaries first before trying the master [PR 844](https://github.com/pgjdbc/pgjdbc/pull/844).
|
||||
- Avoid reflective access to TimeZone.defaultTimeZone in Java 9+ [PR 1002](https://github.com/pgjdbc/pgjdbc/pull/1002) fixes [Issue 986](https://github.com/pgjdbc/pgjdbc/issues/986)
|
||||
|
||||
### Fixed
|
||||
- Make warnings available as soon as they are received from the server. This is useful for long running queries, where it can be beneficial to know about a warning before the query completes. [PR 857](https://github.com/pgjdbc/pgjdbc/pull/857)
|
||||
- Use 00:00:00 and 24:00:00 for LocalTime.MIN/MAX. [PR 992](https://github.com/pgjdbc/pgjdbc/pull/992)
|
||||
- Now the DatabaseMetaData.getFunctions() implementation complies with the JDBC docs. [PR 918](https://github.com/pgjdbc/pgjdbc/pull/918)
|
||||
- Execute autosave/rollback savepoint via simple queries always to prevent "statement S_xx not exists" when autosaving fixes [Issue #955](https://github.com/pgjdbc/pgjdbc/issues/955)
|
||||
- Received resultset tuples, but no field structure for them" when bind failure happens on 5th execution of a statement [Issue 811](https://github.com/pgjdbc/pgjdbc/issues/811)
|
||||
|
||||
### Removed
|
||||
- Drop support for the (insecure) crypt authentication method. [PR 1026](https://github.com/pgjdbc/pgjdbc/pull/1026)
|
||||
|
||||
### Deprecated
|
||||
- Reintroduce Driver.getVersion for backward compatibility reasons, mark it as deprecated as application should not rely on it (regression since 42.0.0) [50d5dd3e](https://github.com/pgjdbc/pgjdbc/commit/50d5dd3e708a92602e04d6b4aa0822ad3f110a78)
|
||||
|
||||
## [42.1.4] (2017-08-01)
|
||||
### Changed
|
||||
- Statements with non-zero fetchSize no longer require server-side named handle. This might cause issues when using old PostgreSQL versions (pre-8.4)+fetchSize+interleaved ResultSet processing combo. [Issue 869](https://github.com/pgjdbc/pgjdbc/issues/869)
|
||||
|
||||
## [42.1.3] (2017-07-14)
|
||||
### Fixed
|
||||
- Fix NPE in PreparedStatement.executeBatch in case of empty batch (regression since 42.1.2). [PR 867](https://github.com/pgjdbc/pgjdbc/pull/867)
|
||||
|
||||
## [42.1.2] (2017-07-12)
|
||||
### Changed
|
||||
- Better logic for *returning* keyword detection. Previously, pgjdbc could be defeated by column names that contain *returning*, so pgjdbc failed to "return generated keys" as it considered statement as already having *returning* keyword [PR 824](https://github.com/pgjdbc/pgjdbc/pull/824) [201daf1d](https://github.com/pgjdbc/pgjdbc/commit/201daf1dc916bbc35e2bbec961aebfd1b1e30bfc)
|
||||
- Use server-prepared statements for batch inserts when prepareThreshold>0. Note: this enables batch to use server-prepared from the first *executeBatch()* execution (previously it waited for *prepareThreshold* *executeBatch()* calls) [abc3d9d7](https://github.com/pgjdbc/pgjdbc/commit/abc3d9d7f34a001322fbbe53f25d5e77a33a667f)
|
||||
|
||||
### Fixed
|
||||
- Replication API: fix issue in #834 setting statusIntervalUpdate causes high CPU load. [PR 835](https://github.com/pgjdbc/pgjdbc/pull/835) [59236b74](https://github.com/pgjdbc/pgjdbc/commit/59236b74acdd400d9d91d3eb2bb07d70b15392e5)
|
||||
|
||||
### Regresions
|
||||
- NPE in PreparedStatement.executeBatch in case of empty batch. Fixed in 42.1.3
|
||||
|
||||
## [42.1.1] (2017-05-05)
|
||||
### Fixed
|
||||
- Fix infinite dates that might be corrupted when transferred in binary for certain JREs. For instance, 5881610-07-11 instead of infinity. [1e5bf563](https://github.com/pgjdbc/pgjdbc/commit/1e5bf563f41203417281117ed20b183cd295b4e0)
|
||||
|
||||
## [42.1.0] (2017-05-04)
|
||||
### Added
|
||||
- Support fetching a REF_CURSOR using getObject [PR 809](https://github.com/pgjdbc/pgjdbc/pull/809)
|
||||
|
||||
### Fixed
|
||||
- Fix data being truncated in setCharacterStream (bug introduced in 42.0.0) [PR 802](https://github.com/pgjdbc/pgjdbc/pull/802)
|
||||
- Fix calculation of lastReceiveLSN for logical replication [PR 801](https://github.com/pgjdbc/pgjdbc/pull/801)
|
||||
- Make sure org.postgresql.Driver is loaded when accessing though DataSource interface [Issue 768](https://github.com/pgjdbc/pgjdbc/issues/768)
|
||||
|
||||
### Regressions
|
||||
- There's no 42.1.0.jre6 version due to infinity handling bug. Fixed in 42.1.1.jre6
|
||||
|
||||
## [42.0.0] (2017-02-20)
|
||||
### Added
|
||||
- Replication protocol API was added: [replication API documentation](https://jdbc.postgresql.org//documentation/head/replication.html). [PR 550](https://github.com/pgjdbc/pgjdbc/pull/550)
|
||||
- java.util.logging is now used for logging: [logging documentation](https://jdbc.postgresql.org//documentation/head/logging.html). [PR 722](https://github.com/pgjdbc/pgjdbc/pull/722)
|
||||
- Add support for PreparedStatement.setCharacterStream(int, Reader). [ee4c4265](https://github.com/pgjdbc/pgjdbc/commit/ee4c4265aebc1c73a1d1fabac5ba259d1fbfd1e4)
|
||||
|
||||
### Changed
|
||||
- Version bumped to 42.0.0 to avoid version clash with PostgreSQL version and follow a better sematic versioning. [46634923](https://github.com/pgjdbc/pgjdbc/commit/466349236622c6b03bb9cd8d7f517c3ce0586751)
|
||||
- Ensure executeBatch() can be used with pgbouncer. Previously pgjdbc could use server-prepared statements for batch execution even with prepareThreshold=0. [Issue 742](https://github.com/pgjdbc/pgjdbc/issues/742)
|
||||
- Error position is displayed when SQL has unterminated literals, comments, etc. [Issue 688](https://github.com/pgjdbc/pgjdbc/issues/688)
|
||||
- Strict handling of accepted values in getBoolean and setObject(BOOLEAN), now it follows PostgreSQL accepted values, only 1 and 0 for numeric types are accepted (previously !=0 was true). [PR 732](https://github.com/pgjdbc/pgjdbc/pull/732)
|
||||
- Return correct versions and name of the driver. [PR 668](https://github.com/pgjdbc/pgjdbc/pull/668)
|
||||
|
||||
### Removed
|
||||
- Support for PostgreSQL versions below 8.2 was dropped. [PR 661](https://github.com/pgjdbc/pgjdbc/pull/661)
|
||||
|
||||
### Deprecated
|
||||
- Deprecated PGPoolingDataSource, instead of this class you should use a fully featured connection pool like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc. [PR 739](https://github.com/pgjdbc/pgjdbc/pull/739)
|
||||
|
||||
### Regressions
|
||||
- Data truncated in setCharacterStream. Fixed in 42.1.0
|
||||
- No suitable driver found for jdbc:postgresql when using a DataSource implementation. Fixed in 42.1.0
|
||||
|
||||
|
||||
[42.0.0]: https://github.com/pgjdbc/pgjdbc/compare/REL9.4.1212...REL42.0.0
|
||||
[42.1.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.0.0...REL42.1.0
|
||||
[42.1.1]: https://github.com/pgjdbc/pgjdbc/compare/REL42.1.0...REL42.1.1
|
||||
[42.1.2]: https://github.com/pgjdbc/pgjdbc/compare/REL42.1.1...REL42.1.2
|
||||
[42.1.3]: https://github.com/pgjdbc/pgjdbc/compare/REL42.1.2...REL42.1.3
|
||||
[42.1.4]: https://github.com/pgjdbc/pgjdbc/compare/REL42.1.3...REL42.1.4
|
||||
[42.2.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.1.4...REL42.2.0
|
||||
[42.2.1]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.0...REL42.2.1
|
||||
[42.2.2]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.1...REL42.2.2
|
||||
[42.2.3]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.2...REL42.2.3
|
||||
[42.2.4]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.3...REL42.2.4
|
||||
[42.2.5]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.4...REL42.2.5
|
||||
[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.2.5...HEAD
|
76
CONTRIBUTING.md
Normal file
76
CONTRIBUTING.md
Normal file
@ -0,0 +1,76 @@
|
||||
# How to contribute
|
||||
|
||||
## Report issues
|
||||
|
||||
A great way to contribute to the project is to send a detailed report when you encounter an issue. We always appreciate a well-written, thorough bug report and feature propose, and will appreciate you for it!
|
||||
|
||||
### Issues format
|
||||
|
||||
When reporting issues, refer to this format:
|
||||
|
||||
- Is this a BUG REPORT or FEATURE REQUEST?
|
||||
- What happened?
|
||||
- What you expected to happen?
|
||||
- What happened?
|
||||
- How to reproduce it (as minimally and precisely as possible)
|
||||
- Anything else we need to know?
|
||||
- Environment
|
||||
|
||||
See more about [ISSUE_TEMPLATE](.gitee/ISSUE_TEMPLATE.en.md).
|
||||
|
||||
## Submit pull requests
|
||||
|
||||
If you are a beginner and expect this project as the gate to open source world, this tutorial is one of the best choices for you. Just follow the guidance and you will find the pleasure to become a contributor.
|
||||
|
||||
### Step 1: Fork repository
|
||||
|
||||
Before making modifications of this project, you need to make sure that this project have been forked to your own
|
||||
repository. It means that there will be parallel development between this repo and your own repo, so be careful
|
||||
to avoid the inconsistency between these two repos.
|
||||
|
||||
### Step 2: Clone the remote repository
|
||||
|
||||
If you want to download the code to the local machine, ```git``` is the best way:
|
||||
```
|
||||
git clone https://your_repo_url/community.git
|
||||
```
|
||||
|
||||
### Step 3: Develop code locally
|
||||
|
||||
To avoid inconsistency between multiple branches, we SUGGEST checking out to a new branch:
|
||||
```
|
||||
git checkout -b new_branch_name origin/master
|
||||
```
|
||||
Then you can change the code arbitrarily.
|
||||
|
||||
### Step 4: Push the code to the remote repository
|
||||
|
||||
After updating the code, you should push the update in the formal way:
|
||||
```
|
||||
git add .
|
||||
git status (Check the update status)
|
||||
git commit -m "Your commit description"
|
||||
git commit --amend (Add the concrete description of your commit)
|
||||
git push origin new_branch_name
|
||||
```
|
||||
|
||||
### Step 5: Pull a request to repository
|
||||
|
||||
In the last step, your need to pull a compare request between your new branch and development branch. After
|
||||
finishing the pull request, the CI will be automatically set up for building test.
|
||||
|
||||
### Pull requests format
|
||||
|
||||
When submitting pull requests, refer to this format:
|
||||
|
||||
- What this PR does / why we need it?
|
||||
- Which issue this PR fixes?
|
||||
- Special notes for your reviewer
|
||||
- Release note
|
||||
|
||||
See more about [PULL_REQUEST_TEMPLATE](.gitee/PULL_REQUEST_TEMPLATE.en.md).
|
||||
|
||||
### Code style
|
||||
|
||||
```TO BE DEFINED```
|
||||
|
23
LICENSE
Normal file
23
LICENSE
Normal file
@ -0,0 +1,23 @@
|
||||
Copyright (c) 1997, PostgreSQL Global Development Group
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
1
META-INF/services/java.sql.Driver
Normal file
1
META-INF/services/java.sql.Driver
Normal file
@ -0,0 +1 @@
|
||||
org.postgresql.Driver
|
194
README
Normal file
194
README
Normal file
@ -0,0 +1,194 @@
|
||||
This is a simple readme describing how to compile and use the jdbc driver.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
This isn't a guide on how to use JDBC - for that refer to Oracle's website:
|
||||
|
||||
http://www.oracle.com/technetwork/java/javase/jdbc/
|
||||
|
||||
and the JDBC tutorial:
|
||||
|
||||
http://docs.oracle.com/javase/tutorial/jdbc/
|
||||
|
||||
For problems with this driver, refer to driver's home page:
|
||||
|
||||
http://jdbc.postgresql.org/
|
||||
|
||||
and associated mailing list:
|
||||
|
||||
http://archives.postgresql.org/pgsql-jdbc/
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
COMPILING
|
||||
|
||||
To compile you will need to have a Java 8 and will need to have
|
||||
Maven installed.
|
||||
|
||||
Once you have Maven, simply run sh build.sh in the top level directory.
|
||||
This will compile the correct driver for your JVM, and build a .jar file (Java ARchive)
|
||||
called postgresql.jar.
|
||||
|
||||
REMEMBER: Once you have compiled the driver, it will work on ALL platforms
|
||||
that support that version of the API. You don't need to build it for each
|
||||
platform.
|
||||
|
||||
If you are having problems, prebuilt versions of the driver
|
||||
are available at http://jdbc.postgresql.org/
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
INSTALLING THE DRIVER
|
||||
|
||||
To install the driver, the postgresql.jar file has to be in the classpath.
|
||||
|
||||
ie: under LINUX/SOLARIS (the example here is my linux box):
|
||||
|
||||
export CLASSPATH=.:/usr/local/pgsql/share/java/postgresql.jar
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
USING THE DRIVER
|
||||
|
||||
To use the driver, you must introduce it to JDBC. Again, there's two ways
|
||||
of doing this:
|
||||
|
||||
1: Hardcoded.
|
||||
|
||||
This method hardcodes your driver into your application/applet. You
|
||||
introduce the driver using the following snippet of code:
|
||||
|
||||
try {
|
||||
Class.forName("org.postgresql.Driver");
|
||||
} catch(Exception e) {
|
||||
// your error handling code goes here
|
||||
}
|
||||
|
||||
Remember, this method restricts your code to just the postgresql database.
|
||||
However, this is how most people load the driver.
|
||||
|
||||
2: Parameters
|
||||
|
||||
This method specifies the driver from the command line. When running the
|
||||
application, you specify the driver using the option:
|
||||
|
||||
-Djdbc.drivers=org.postgresql.Driver
|
||||
|
||||
eg: This is an example of running one of my other projects with the driver:
|
||||
|
||||
java -Djdbc.drivers=org.postgresql.Driver uk.org.retep.finder.Main
|
||||
|
||||
note: This method only works with Applications (not for Applets).
|
||||
However, the application is not tied to one driver, so if you needed
|
||||
to switch databases (why I don't know ;-) ), you don't need to
|
||||
recompile the application (as long as you havent hardcoded the url's).
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
JDBC URL syntax
|
||||
|
||||
The driver recognises JDBC URL's of the form:
|
||||
|
||||
jdbc:postgresql:database
|
||||
|
||||
jdbc:postgresql://host/database
|
||||
|
||||
jdbc:postgresql://host:port/database
|
||||
|
||||
Also, you can supply both username and passwords as arguments, by appending
|
||||
them to the URL. eg:
|
||||
|
||||
jdbc:postgresql:database?user=me
|
||||
jdbc:postgresql:database?user=me&password=mypass
|
||||
|
||||
Notes:
|
||||
|
||||
1) If you are connecting to localhost or 127.0.0.1 you can leave it out of the
|
||||
URL. ie: jdbc:postgresql://localhost/mydb can be replaced with
|
||||
jdbc:postgresql:mydb
|
||||
|
||||
2) The port defaults to 5431 if it's left out.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
That's the basics related to this driver. You'll need to read the JDBC Docs
|
||||
on how to use it.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
BUG REPORTS, PATCHES AND DEVELOPMENT
|
||||
|
||||
PgJDBC development is carried out on the PgJDBC mailing list:
|
||||
|
||||
http://jdbc.postgresql.org/lists.html
|
||||
|
||||
and on GitHub:
|
||||
|
||||
https://github.com/pgjdbc/pgjdbc
|
||||
|
||||
Bug reports
|
||||
-----------
|
||||
|
||||
For bug reports please post on pgsql-jdbc or add a GitHub issue. If you include
|
||||
additional unit tests demonstrating the issue, or self-contained runnable test
|
||||
case including SQL scripts etc that shows the problem, your report is likely to
|
||||
get more attention. Make sure you include appropriate details on your
|
||||
environment, like your JDK version, container/appserver if any, platform,
|
||||
PostgreSQL version, etc. Err on the site of excess detail if in doubt.
|
||||
|
||||
Bug fixes and new features
|
||||
--------------------------
|
||||
|
||||
If you've developed a patch you want to propose for inclusion in PgJDBC, feel
|
||||
free to send a GitHub pull request or post the patch on the PgJDBC mailing
|
||||
list. Make sure your patch includes additional unit tests demonstrating and
|
||||
testing any new features. In the case of bug fixes, where possible include a
|
||||
new unit test that failed before the fix and passes after it.
|
||||
|
||||
For information on working with GitHub, see:
|
||||
http://help.github.com/articles/fork-a-repo
|
||||
http://learn.github.com/p/intro.html
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
Remember to test proposed PgJDBC patches when running against older PostgreSQL
|
||||
versions where possible, not just against the PostgreSQL you use yourself.
|
||||
|
||||
You also need to test your changes with older JDKs. PgJDBC must support JDK5
|
||||
("Java 1.5") and newer, which means you can't use annotations, auto-boxing, for
|
||||
(:), and numerous other features added since JDK 5. Code that's JDBC4 specific
|
||||
may use JDK6 features, and code that's JDBC4.1 specific may use JDK7 features.
|
||||
Common code and JDBC3 code needs to stick to Java 1.5.
|
||||
|
||||
Two different versions of PgJDBC can be built, the JDBC 3 and JDBC 4 drivers.
|
||||
The former may be built with JDK 5, while building JDBC4 requires JDK 6 or 7.
|
||||
The driver to build is auto-selected based on the JDK version used to run the
|
||||
build. The best way to test a proposed change with both the JDBC3 and JDBC4
|
||||
drivers is to build and test with both JDK5 and JDK6 or 7.
|
||||
|
||||
You can get old JDK versions from the Oracle Java Archive:
|
||||
|
||||
http://www.oracle.com/technetwork/java/archive-139210.html
|
||||
|
||||
Typically you can test against an old JDK with:
|
||||
|
||||
export JAVA_HOME=/path/to/jdk_1_5
|
||||
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:
|
||||
mvn clean install -PexcludeOsgiFiles
|
||||
Please firstly compile the openGauss-server, and create the user, change the build.properties user, port, etc.
|
||||
Just test without compile
|
||||
mvn test -PexcludeOsgiFiles
|
||||
Ideas
|
||||
-----
|
||||
|
||||
If you have ideas or proposed changes, please post on the mailing list.
|
||||
Think about how the change would affect other users, what side effects it
|
||||
might have, how practical it is to implement, what implications it would
|
||||
have for standards compliance and security, etc.
|
||||
|
||||
Few of the PgJDBC developers have much spare time, so it's unlikely that your
|
||||
idea will be picked up and implemented for you. The best way to make sure a
|
||||
desired feature or improvement happens is to implement it yourself. The PgJDBC
|
||||
sources are reasonably clear and they're pure Java, so it's sometimes easier
|
||||
than you might expect.
|
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# openGauss-connector-jdbc
|
||||
|
||||
#### Description
|
||||
openGauss jdbc connector
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
||||
# openGauss-connector-jdbc
|
||||
|
||||
#### 介绍
|
||||
openGauss jdbc connector
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
592
Third_Party_Open_Source_Software_Notice
Normal file
592
Third_Party_Open_Source_Software_Notice
Normal file
@ -0,0 +1,592 @@
|
||||
THIRD PARTY OPEN SOURCE SOFTWARE NOTICE
|
||||
|
||||
|
||||
|
||||
Please note we provide an open source software notice for the third party open source software along with this software and/or this software component contributed by Huawei (in the following just ��this SOFTWARE��). The open source software licenses are granted by the respective right holders.
|
||||
|
||||
Warranty Disclaimer
|
||||
THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
||||
|
||||
Copyright Notice and License Texts
|
||||
|
||||
Software: Postgresql JDBC Driver 42.2.5
|
||||
Copyright notice��Copyright (c) 1997, PostgreSQL Global Development Group
|
||||
All rights reserved.
|
||||
License��BSD 2-Clause License
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Software: AdoptOpenJDK jdk8u222-b10
|
||||
Copyright notice��Copyright ? 2020 Oracle Corporation and/or its affiliates.
|
||||
License��GPL V2.0 With Classpath Exception
|
||||
OpenJDK: GPLv2 + Classpath ExceptionGNU General Public License, version 2,
|
||||
with the Classpath ExceptionThe GNU General Public License (GPL)
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software is
|
||||
covered by the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom to
|
||||
distribute copies of free software (and charge for this service if you wish),
|
||||
that you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs; and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||
you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of the
|
||||
software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that you have. You must
|
||||
make sure that they, too, receive or can get the source code. And you must
|
||||
show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If the
|
||||
software is modified by someone else and passed on, we want its recipients to
|
||||
know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program proprietary.
|
||||
To prevent this, we have made it clear that any patent must be licensed for
|
||||
everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms of
|
||||
this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or
|
||||
translated into another language. (Hereinafter, translation is included
|
||||
without limitation in the term "modification".) Each licensee is addressed as
|
||||
"you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by
|
||||
this License; they are outside its scope. The act of running the Program is
|
||||
not restricted, and the output from the Program is covered only if its contents
|
||||
constitute a work based on the Program (independent of having been made by
|
||||
running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as
|
||||
you receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice and
|
||||
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||
and to the absence of any warranty; and give any other recipients of the
|
||||
Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may
|
||||
at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus
|
||||
forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all of
|
||||
these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating
|
||||
that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of
|
||||
this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the
|
||||
most ordinary way, to print or display an announcement including an
|
||||
appropriate copyright notice and a notice that there is no warranty (or
|
||||
else, saying that you provide a warranty) and that users may redistribute
|
||||
the program under these conditions, and telling the user how to view a copy
|
||||
of this License. (Exception: if the Program itself is interactive but does
|
||||
not normally print such an announcement, your work based on the Program is
|
||||
not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License, and
|
||||
its terms, do not apply to those sections when you distribute them as separate
|
||||
works. But when you distribute the same sections as part of a whole which is a
|
||||
work based on the Program, the distribution of the whole must be on the terms
|
||||
of this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of derivative or collective works based on
|
||||
the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the
|
||||
Program (or with a work based on the Program) on a volume of a storage or
|
||||
distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under
|
||||
Section 2) in object code or executable form under the terms of Sections 1 and
|
||||
2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source
|
||||
code, which must be distributed under the terms of Sections 1 and 2 above
|
||||
on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to
|
||||
give any third party, for a charge no more than your cost of physically
|
||||
performing source distribution, a complete machine-readable copy of the
|
||||
corresponding source code, to be distributed under the terms of Sections 1
|
||||
and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to
|
||||
distribute corresponding source code. (This alternative is allowed only
|
||||
for noncommercial distribution and only if you received the program in
|
||||
object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code
|
||||
distributed need not include anything that is normally distributed (in either
|
||||
source or binary form) with the major components (compiler, kernel, and so on)
|
||||
of the operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the source
|
||||
code from the same place counts as distribution of the source code, even though
|
||||
third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies, or
|
||||
rights, from you under this License will not have their licenses terminated so
|
||||
long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it.
|
||||
However, nothing else grants you permission to modify or distribute the Program
|
||||
or its derivative works. These actions are prohibited by law if you do not
|
||||
accept this License. Therefore, by modifying or distributing the Program (or
|
||||
any work based on the Program), you indicate your acceptance of this License to
|
||||
do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor to
|
||||
copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of the
|
||||
rights granted herein. You are not responsible for enforcing compliance by
|
||||
third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues), conditions
|
||||
are imposed on you (whether by court order, agreement or otherwise) that
|
||||
contradict the conditions of this License, they do not excuse you from the
|
||||
conditions of this License. If you cannot distribute so as to satisfy
|
||||
simultaneously your obligations under this License and any other pertinent
|
||||
obligations, then as a consequence you may not distribute the Program at all.
|
||||
For example, if a patent license would not permit royalty-free redistribution
|
||||
of the Program by all those who receive copies directly or indirectly through
|
||||
you, then the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or
|
||||
other property right claims or to contest validity of any such claims; this
|
||||
section has the sole purpose of protecting the integrity of the free software
|
||||
distribution system, which is implemented by public license practices. Many
|
||||
people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose that
|
||||
choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Program under this License may add an explicit
|
||||
geographical distribution limitation excluding those countries, so that
|
||||
distribution is permitted only in or among countries not thus excluded. In
|
||||
such case, this License incorporates the limitation as if written in the body
|
||||
of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the
|
||||
General Public License from time to time. Such new versions will be similar in
|
||||
spirit to the present version, but may differ in detail to address new problems
|
||||
or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any later
|
||||
version", you have the option of following the terms and conditions either of
|
||||
that version or of any later version published by the Free Software Foundation.
|
||||
If the Program does not specify a version number of this License, you may
|
||||
choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status of
|
||||
all derivatives of our free software and of promoting the sharing and reuse of
|
||||
software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
|
||||
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
|
||||
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
|
||||
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
One line to give the program's name and a brief idea of what it does.
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it
|
||||
starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
|
||||
software, and you are welcome to redistribute it under certain conditions;
|
||||
type 'show c' for details.
|
||||
|
||||
The hypothetical commands 'show w' and 'show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than 'show w' and 'show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
'Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General Public
|
||||
License instead of this License.
|
||||
|
||||
|
||||
"CLASSPATH" EXCEPTION TO THE GPL
|
||||
|
||||
Certain source files distributed by Sun Microsystems, Inc. are subject to
|
||||
the following clarification and special exception to the GPL, but only where
|
||||
Sun has expressly included in the particular source file's header the words
|
||||
"Sun designates this particular file as subject to the "Classpath" exception
|
||||
as provided by Sun in the LICENSE file that accompanied this code."
|
||||
|
||||
Linking this library statically or dynamically with other modules is making
|
||||
a combined work based on this library. Thus, the terms and conditions of
|
||||
the GNU General Public License cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,
|
||||
and to copy and distribute the resulting executable under terms of your
|
||||
choice, provided that you also meet, for each linked independent module,
|
||||
the terms and conditions of the license of that module. An independent
|
||||
module is a module which is not derived from or based on this library. If
|
||||
you modify this library, you may extend this exception to your version of
|
||||
the library, but you are not obligated to do so. If you do not wish to do
|
||||
so, delete this exception statement from your version.
|
||||
|
||||
Software: Apache Maven 3.6.3
|
||||
Copyright 1999-2019 The Apache Software Foundation
|
||||
License��Apache License V2.0
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
36
appveyor.yml
Normal file
36
appveyor.yml
Normal file
@ -0,0 +1,36 @@
|
||||
# appveyor.yml
|
||||
init:
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\postgresql.conf" "wal_level=logical"
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\postgresql.conf" "max_wal_senders=3"
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\postgresql.conf" "wal_keep_segments=10"
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\postgresql.conf" "wal_sender_timeout=5s"
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\postgresql.conf" "max_replication_slots=10"
|
||||
- ps: Add-Content "c:\program files\postgresql\9.6\data\pg_hba.conf" "host replication all 127.0.0.1/32 trust"
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^tmp\/.*/
|
||||
- /^REL.*/
|
||||
|
||||
services:
|
||||
- postgresql96
|
||||
|
||||
before_build:
|
||||
- SET PATH=C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
|
||||
- SET PGUSER=postgres
|
||||
- SET PGPASSWORD=Password12!
|
||||
- createuser -U postgres test
|
||||
- psql -U postgres -c "alter user test with password 'test'" postgres
|
||||
- createdb -U postgres -O test test
|
||||
|
||||
build_script:
|
||||
- mvn clean package -DskipTests
|
||||
|
||||
test_script:
|
||||
- echo redirect escape ^> foo.bar
|
||||
- echo privilegedPassword=Password12!>c:\projects\pgjdbc\build.local.properties
|
||||
- mvn package
|
||||
|
||||
cache:
|
||||
- C:\Users\appveyor\.m2
|
80
backend_protocol_v4_wanted_features.md
Normal file
80
backend_protocol_v4_wanted_features.md
Normal file
@ -0,0 +1,80 @@
|
||||
# PostgreSQL backend protocol: wanted features
|
||||
|
||||
Current protocol is documented here: http://www.postgresql.org/docs/9.4/static/protocol.html
|
||||
|
||||
It turns out it lacks certain features, thus it makes clients more complex, slower, etc.
|
||||
|
||||
Here's the list of features that often appear in discussions.
|
||||
|
||||
## Features
|
||||
|
||||
### Binary transfer vs exact data type
|
||||
|
||||
Current protocol supports text and binary transfer.
|
||||
It turns out in text mode backend does not need to know the exact data type. In most cases it can
|
||||
easily deduce the data type. Binary mode is typically faster, however when consuming binary,
|
||||
backend assumes the data type is exact and it does not consider casts.
|
||||
|
||||
It would be nice to have an ability to pass a value in binary form (for efficiency) yet
|
||||
make backend deduce proper data type for it.
|
||||
|
||||
|
||||
Kevin Wooten: my biggest request is always to treat binary types as if the client “just knows” how
|
||||
to handle them. There are numerous cases with the text format where the server will coerce columns
|
||||
to the most correct type and it will not do this for binary requests; it just spits out a complaint
|
||||
that you’ve got the wrong type.
|
||||
|
||||
That, and being able to switch to “prefer binary” mode in the protocol. So when I make an non-bound
|
||||
request I can get the results back in binary. Currently you can only get them in text format.
|
||||
This has a couple of implications. First, speed, you always have to bind before querying to get
|
||||
binary results. Second is multiple SQL statements in a single request, which you
|
||||
cannot do in bound requests.
|
||||
|
||||
### Non-trivial semantics of numerics in text mode
|
||||
|
||||
In text mode, numerics and money types are transferred with unknown decimal separator.
|
||||
This makes it hard to decode the value as it is locale-dependent.
|
||||
|
||||
See: https://github.com/pgjdbc/pgjdbc/pull/439
|
||||
|
||||
### Lack of `prepared statement invalidated` messages from backend
|
||||
|
||||
Server-prepared statement might become invalid due to table structure change, column type change,
|
||||
etc.
|
||||
It results in "your prepared statement is no longer valid". This is no fun.
|
||||
|
||||
See: https://github.com/pgjdbc/pgjdbc/pull/451
|
||||
|
||||
## Brain dumps
|
||||
|
||||
### Álvaro Hernández
|
||||
|
||||
- Uniform headers (type byte). Some messages (startup, ssl, etc) don't have the type byte marker.
|
||||
This is annoying.
|
||||
- Byte type re-use. The type byte is re-used across senders and receivers. It is unambiguous,
|
||||
but it is still very weird.
|
||||
- Query pipelining. There has been much discussion about it. I don't have a clear conclusion other
|
||||
than it's somehow possible, but requires driver support (keep track of sent/received messages
|
||||
and errors). This could be easily handled with protocol support, like using a unique id for every
|
||||
message and including in the reply that id.
|
||||
- Cluster support. Real production environments are clusters (sets of PostgreSQL servers
|
||||
using any kind of replication). Protocol should be concerned with this, specially if some HA
|
||||
mechanisms are built into the protocol.
|
||||
- Server metadata without authentication. Some messages should be able to be exchanged
|
||||
to get information about servers (like version, read/write state and probably others) without
|
||||
having to authenticate and involve in lengthy processes.
|
||||
- No out-of-band messages (like query cancellation)
|
||||
- Simplified design (current is too complex and with too many messages)
|
||||
- Specified in a formal syntax (I mean not English, a formal language for specifying it) and
|
||||
with a TCK (Test Compatibility Kit)
|
||||
- Allow some controlled form of protocol extensibility
|
||||
- A back-pressure method for query results
|
||||
- All the "usual suspects": support for binary format, partial query results,
|
||||
large objects and so on
|
||||
|
||||
### Vladimir Sitnikov
|
||||
|
||||
- compressed streams over network
|
||||
- "query response status" messages being sent in plain text (`insert 1`, `select 10`, etc.).
|
||||
Having some binary there would make things easier to parse.
|
||||
- unable to use prepared statements for `set "application_name"=...`, etc
|
41
build.properties
Normal file
41
build.properties
Normal file
@ -0,0 +1,41 @@
|
||||
# Default build parameters. These may be overridden by local configuration
|
||||
# settings in build.local.properties.
|
||||
#
|
||||
|
||||
major=9
|
||||
minor=3
|
||||
fullversion=9.3
|
||||
def_pgport=5432
|
||||
enable_debug=yes
|
||||
|
||||
maven.group.id=org.postgresql
|
||||
maven.artifact.id=postgresql
|
||||
maven.artifact.version=9.3-1103
|
||||
maven.artifact.description=The PostgreSQL Driver
|
||||
|
||||
# Maven snapshots and staging repository id and url
|
||||
maven.snapshots.repository.id=sonatype-nexus-snapshots
|
||||
maven.snapshots.repository.url=https://oss.sonatype.org/content/repositories/snapshots
|
||||
maven.staging.repository.id=sonatype-nexus-staging
|
||||
maven.staging.repository.url=https://oss.sonatype.org/service/local/staging/deploy/maven2
|
||||
gs_version=openGauss 1.0.0
|
||||
# the open postgresql jdbc properties
|
||||
server=localhost
|
||||
port=5432
|
||||
secondaryServer=localhost
|
||||
secondaryPort=5433
|
||||
secondaryServer2=localhost
|
||||
secondaryServerPort2=5434
|
||||
database=postgres
|
||||
username=test
|
||||
password=test123@
|
||||
privilegedUser=postgres
|
||||
privilegedPassword=
|
||||
sspiusername=testsspi
|
||||
preparethreshold=5
|
||||
loggerLevel=OFF
|
||||
loggerFile=target/pgjdbc-tests.log
|
||||
protocolVersion=0
|
||||
sslpassword=sslpwd
|
||||
|
||||
|
119
build.sh
Executable file
119
build.sh
Executable file
@ -0,0 +1,119 @@
|
||||
|
||||
BUILD_FAILED=1
|
||||
java_path=""
|
||||
ant_path=""
|
||||
JDBC_DIR=$(dirname $(readlink -f $0))
|
||||
LOG_FILE=$JDBC_DIR/logfile
|
||||
THIRD_DIR=$JDBC_DIR/buildtools
|
||||
PLATFORM=""
|
||||
|
||||
die()
|
||||
{
|
||||
echo "ERROR: $@"
|
||||
exit $BUILD_FAILED
|
||||
}
|
||||
|
||||
function get_platform()
|
||||
{
|
||||
echo "Get the platform"
|
||||
PLATFORM=`uname -i`
|
||||
echo "Current platform is" $PLATFORM
|
||||
}
|
||||
|
||||
function prepare_x86_java_env()
|
||||
{
|
||||
echo "Prepare the build enviroment."
|
||||
cd $THIRD_DIR
|
||||
if [ ! -d $THIRD_DIR/jdk8u222-b10 ]; then
|
||||
tar -xf OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to uncompress jdk."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export JAVA_HOME=$THIRD_DIR/jdk8u222-b10
|
||||
export JRE_HOME=$JAVA_HOME/jre
|
||||
export LD_LIBRARY_PATH=$JRE_HOME/lib/amd64/server:$LD_LIBRARY_PATH
|
||||
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
|
||||
|
||||
JAVA_VERSION=`java -version 2>&1 | awk -F '"' '/version/ {print $2}'`
|
||||
echo java version is $JAVA_VERSION
|
||||
}
|
||||
|
||||
function prepare_arm_java_env()
|
||||
{
|
||||
echo "Prepare the build enviroment."
|
||||
cd $THIRD_DIR
|
||||
if [ ! -d $THIRD_DIR/jdk8u222-b10 ]; then
|
||||
tar -xf OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to uncompress jdk."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export JAVA_HOME=$THIRD_DIR/jdk8u222-b10
|
||||
export JRE_HOME=$JAVA_HOME/jre
|
||||
export LD_LIBRARY_PATH=$JRE_HOME/lib/aarch64/server:$LD_LIBRARY_PATH
|
||||
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
|
||||
|
||||
JAVA_VERSION=`java -version 2>&1 | awk -F '"' '/version/ {print $2}'`
|
||||
echo java version is $JAVA_VERSION
|
||||
}
|
||||
|
||||
function prepare_env()
|
||||
{
|
||||
if [ "$PLATFORM" = "x86_64" ]; then
|
||||
prepare_x86_java_env
|
||||
elif [ "$PLATFORM" = "aarch64" ]; then
|
||||
prepare_arm_java_env
|
||||
else
|
||||
die "Failed to get platform with command uname -i."
|
||||
fi
|
||||
prepare_maven_env
|
||||
}
|
||||
|
||||
function prepare_maven_env()
|
||||
{
|
||||
echo "Prepare the build enviroment."
|
||||
cd $THIRD_DIR
|
||||
if [ ! -d $THIRD_DIR/apache-maven-3.6.3 ]; then
|
||||
tar -xf apache-maven-3.6.3-bin.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to uncompress ant."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export MAVEN_HOME=$THIRD_DIR/apache-maven-3.6.3
|
||||
export PATH=$MAVEN_HOME/bin:$PATH
|
||||
MAVEN_VERSION=`mvn -v 2>&1 | awk '/Apache Maven / {print $3}'`
|
||||
echo maven version is $MAVEN_VERSION
|
||||
}
|
||||
function install_jdbc()
|
||||
{
|
||||
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
|
||||
|
||||
echo "Begin make jdbc..."
|
||||
export CLASSPATH=".:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar"
|
||||
|
||||
cd "${JDBC_DIR}"
|
||||
mvn clean install -Dmaven.test.skip=true >> "$LOG_FILE" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "mvn failed."
|
||||
fi
|
||||
mv pgjdbc/target/postgresql-42.2.5.jar postgresql.jar
|
||||
echo "Successfully make jdbc. The package is postgresql.jar"
|
||||
}
|
||||
|
||||
function clean()
|
||||
{
|
||||
rm -rf "${JDBC_DIR}/build" "${THIRD_DIR}/apache-maven-3.6.3" "${THIRD_DIR}/jdk8u222-b10"
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to remove folder."
|
||||
fi
|
||||
}
|
||||
|
||||
get_platform
|
||||
prepare_env
|
||||
install_jdbc
|
||||
clean
|
BIN
buildtools/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz
Normal file
BIN
buildtools/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz
Normal file
Binary file not shown.
BIN
buildtools/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
Normal file
BIN
buildtools/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
Normal file
Binary file not shown.
6
buildtools/README
Normal file
6
buildtools/README
Normal file
@ -0,0 +1,6 @@
|
||||
Download the MAVEN from https://mirror.bit.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
|
||||
The version shoud be 3.6.3.
|
||||
Download the java x86-64 from https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz
|
||||
The version should be 1.8.
|
||||
Download the java aarch64 from https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz
|
||||
The version should be 1.8.
|
BIN
buildtools/apache-maven-3.6.3-bin.tar.gz
Normal file
BIN
buildtools/apache-maven-3.6.3-bin.tar.gz
Normal file
Binary file not shown.
57
certdir/README
Normal file
57
certdir/README
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
To run the SSL tests, the following properties are used:
|
||||
|
||||
certdir: directory where the certificates and keys are store
|
||||
|
||||
ssl<TYPE><gh|bh><8|9>: a connection string to the appropiate database
|
||||
TYPE is the TYPE or METHOD field from pg_hba.conf that is: host, hostnossl,
|
||||
hostssl and the special types hostsslcert, that corresponds
|
||||
to a hostssl type with clientcert=1 and cert that corresponds
|
||||
to a hostssl type with cert authentication. 'gh' means, the server certificate
|
||||
matches the hostname (good hostname), 'bh' means it is not (bad
|
||||
hostname). It can be simulated with a single database, if two names
|
||||
can be used i.e. localhost and 127.0.0.1. ssloff points to a database,
|
||||
where ssl is off. The last number is the server major version
|
||||
|
||||
For each connection, the following files should be placed into certdir:
|
||||
goodclient.crt, badclient.crt, goodclient.pk8, badclient.pk8, goodroot.crt, badroot.crt
|
||||
optionally prefixed by the value of ssl<TYPE><gh|bh>prefix property, if
|
||||
different files are necessary for different connect strings.
|
||||
|
||||
This directory contains example certificates generated by the following
|
||||
commands:
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -keyout goodclient.key -out goodclient.crt
|
||||
#Common name is test, password is sslpwd
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -keyout badclient.key -out badclient.crt
|
||||
#Common name is test, password is sslpwd
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -nodes -keyout badroot.key -out badroot.crt
|
||||
#Common name is localhost
|
||||
rm badroot.key
|
||||
|
||||
openssl pkcs8 -topk8 -in goodclient.key -out goodclient.pk8 -outform DER -v1 PBE-MD5-DES
|
||||
openssl pkcs8 -topk8 -in badclient.key -out badclient.pk8 -outform DER -v1 PBE-MD5-DES
|
||||
cp goodclient.crt server/root.crt
|
||||
cd server
|
||||
openssl req -x509 -newkey rsa:1024 -nodes -days 3650 -keyout server.key -out server.crt
|
||||
cp server.crt ../goodroot.crt
|
||||
#Common name is localhost, no password
|
||||
|
||||
The subdirectory server contains what should be copied to the PGDATA directory.
|
||||
If you do not overwrite the pg_hba.conf then remember to comment out all lines
|
||||
starting with "host all".
|
||||
|
||||
For the tests the sslinfo module must be installed into every database.
|
||||
The ssl=on must be set in postgresql.conf
|
||||
|
||||
The following command creates the databases and installs the sslinfo module.
|
||||
|
||||
for db in hostssldb hostnossldb certdb hostsslcertdb; do
|
||||
createdb $db
|
||||
psql $db -c "create extension sslinfo"
|
||||
done
|
||||
|
||||
The username for connecting to postgres as specified in build.local.properties tests has to be "test".
|
||||
|
44
certdir/README.md
Normal file
44
certdir/README.md
Normal file
@ -0,0 +1,44 @@
|
||||
To run the SSL tests, the following properties are used:
|
||||
|
||||
* certdir: directory where the certificates and keys are store
|
||||
* enable_ssl_tests: enables SSL tests
|
||||
|
||||
In order to configure PostgreSQL for SSL tests, the following changes should be applied:
|
||||
|
||||
* Copy server/server.crt, server/server.key, and server/root.crt to $PGDATA directory
|
||||
* In $PGDATA directory: chmod 0600 server.crt server.key root.crt
|
||||
* Set ssl=on in postgresql.conf
|
||||
* Set ssl_cert_file=server.crt in postgresql.conf
|
||||
* Set ssl_key_file=server.key in postgresql.conf
|
||||
* Set ssl_ca_file=root.crt in postgresql.conf
|
||||
* Add databases for SSL tests. Note: sslinfo extension is used in tests to tell if connection is using SSL or not
|
||||
|
||||
for db in hostssldb hostnossldb certdb hostsslcertdb; do
|
||||
createdb $db
|
||||
psql $db -c "create extension sslinfo"
|
||||
done
|
||||
* Add test databases to pg_hba.conf. If you do not overwrite the pg_hba.conf then remember to comment out all lines
|
||||
starting with "host all".
|
||||
* Uncomment enable_ssl_tests=true in ssltests.properties
|
||||
* The username for connecting to postgres as specified in build.local.properties tests has to be "test".
|
||||
|
||||
This directory contains example certificates generated by the following
|
||||
commands:
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -keyout goodclient.key -out goodclient.crt
|
||||
#Common name is test, password is sslpwd
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -keyout badclient.key -out badclient.crt
|
||||
#Common name is test, password is sslpwd
|
||||
|
||||
openssl req -x509 -newkey rsa:1024 -days 3650 -nodes -keyout badroot.key -out badroot.crt
|
||||
#Common name is localhost
|
||||
rm badroot.key
|
||||
|
||||
openssl pkcs8 -topk8 -in goodclient.key -out goodclient.pk8 -outform DER -v1 PBE-MD5-DES
|
||||
openssl pkcs8 -topk8 -in badclient.key -out badclient.pk8 -outform DER -v1 PBE-MD5-DES
|
||||
cp goodclient.crt server/root.crt
|
||||
cd server
|
||||
openssl req -x509 -newkey rsa:1024 -nodes -days 3650 -keyout server.key -out server.crt
|
||||
cp server.crt ../goodroot.crt
|
||||
#Common name is localhost, no password
|
18
certdir/badclient.crt
Normal file
18
certdir/badclient.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC3jCCAkegAwIBAgIJAIHg5fMq+z8aMA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3QwHhcNMTExMTEwMjE0MjI3WhcN
|
||||
MjExMTA3MjE0MjI3WjBUMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0
|
||||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQ0wCwYDVQQDEwR0
|
||||
ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbMINU6XwQ/0OSQ4xYRp0o
|
||||
gYzzsaaGgZjBZEpRMCZkB+TPUD/yxDpyfcknsvsBQPQ0bqLLS9yqf5iS26jHGd4U
|
||||
/nInOy5rjIKEbJMUgkbNWiuVl5q1K+GFuTEpjpdLI9NH5X+jL1CxH/h8+j8Mr2iX
|
||||
s4C2gIFu6povShJiIwBNBQIDAQABo4G3MIG0MB0GA1UdDgQWBBQ6L/fB+7uwDN9q
|
||||
T5Do9X4GIbJnxDCBhAYDVR0jBH0we4AUOi/3wfu7sAzfak+Q6PV+BiGyZ8ShWKRW
|
||||
MFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJ
|
||||
bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3SCCQCB4OXzKvs/
|
||||
GjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKq2Q+aE5eC04gW58pAt
|
||||
pobnL/2L0JHCeLPsv0k/1vjulzjBuphbwaibZtiYWZSDKWL8Dvsg+khq7rEIY0W6
|
||||
xXGw5y2scRlCukQvseIxbHUoyOCAWJnoqr7d8MyxP2GlpqSDXHk9wEywZ/6f89oN
|
||||
yudtXjoYuW8157tmvrX3D1yd
|
||||
-----END CERTIFICATE-----
|
18
certdir/badclient.key
Normal file
18
certdir/badclient.key
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,95718EE22B89E019
|
||||
|
||||
78LEg7uq4krPR3C1sQVCiQsPIXroyoDzPHBFmI+ipEJq7obFACK9KROfUAaMlca8
|
||||
ZR1UhtQHCPK4TOG1qKjn8lxeKGLZA25Lcilw6QvZCfNyBa6JUp3cdwzUSv7/qE/Y
|
||||
d/wlVAq71JbOmYsbEwunZlq+DO1AaL91N/2ANgSSC85uR0dye0iZ1C0OZzawMXkd
|
||||
wXRrXb8c8RCH2gQ6V4aMartTZ/DQznA59+NEUYln5IMP4joRM0TTpcuv6oCq1UUw
|
||||
o7xEQcwfBB0tKayxkBfgp8Jvrghzw0usSFt4ad9I4DF/V2izojZgYsnT7yGqsop6
|
||||
7jmPR9llYhDQIZd0V4NZziiRF2Dt/lyG0iUPZq5vlhLaI59FzMAxVSAJP6DrUHQD
|
||||
L76TeGpQm2LRqWliDc+3AMTCKv0TP1IPbIWJrnLxnNf/C29adO+VSeQEQ0+tBU+/
|
||||
DE2GVsQ/xul+QyCwXiOce0pfERLuGjSu/kRa1ylAlrdH4+6vBD0ewuXXHv0eTSxB
|
||||
Vi0vde5a9PzPUMUBkg6PS7IDYJmKm04fFPxx3y8GMlzbZYOYjTepkYMbayekybGK
|
||||
fHVk9Z3lW5yzegaz8iJu/8le6Kn4Ox21FRG45domu1T+8eJuXPoiBUb290SUVuxh
|
||||
VTQWhCA8ElmVCYfrbSnYL3naeqVL+Oc6by3VVhvgiqUuXQTZvKN7mkUOhiNbpz2H
|
||||
iGLwlRj6wXEaS0qLb9NQc9H9Vv6ftj7UPa4FkiJjWhUW0WkA5sqtOKMjLzpsIZtR
|
||||
dFb26NE65tk0lrywQrzMBFM6fk90VrMYyvwukZIJIKRLCBQaG24PLQ==
|
||||
-----END RSA PRIVATE KEY-----
|
BIN
certdir/badclient.pk8
Normal file
BIN
certdir/badclient.pk8
Normal file
Binary file not shown.
18
certdir/badroot.crt
Normal file
18
certdir/badroot.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7zCCAligAwIBAgIJANwlio9cWdoXMA0GCSqGSIb3DQEBBQUAMFkxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMTExMTAyMTQy
|
||||
NTdaFw0yMTExMDcyMTQyNTdaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21l
|
||||
LVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNV
|
||||
BAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA055WKnuQ
|
||||
i6RPdI3LEtx8ztXV7BuiYihPXCRYUahLyF4TAzNGfmqsdQhqUlqzr1P+nlqxh8sm
|
||||
hZGS4NtGPaEjrbPgsBsTVg0XBKpH5yf2RIhBtvAaDG+cCFBjM+LJGzc4we59JkB6
|
||||
n1a/22iSFsCAm+BFBwHk6FqF7u2gGSUOrI0CAwEAAaOBvjCBuzAdBgNVHQ4EFgQU
|
||||
rw3IpiBN56GCi44/goVmHlZdmJswgYsGA1UdIwSBgzCBgIAUrw3IpiBN56GCi44/
|
||||
goVmHlZdmJuhXaRbMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
|
||||
MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
|
||||
Y2FsaG9zdIIJANwlio9cWdoXMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
|
||||
gYEAa08IbYDJsgc45mYG/mviionvhBGs9BS2YapZDIREc/vd0W4FIzHXh5oTJAdF
|
||||
fkPjvHoczPuzGX8EKMBjANPs7h4Cd5xKSSE2Su+QwmZOxVg6eIeQwVZsY7SZFmkC
|
||||
Y2XwdxWvk3VzLdjgj/McmSBp4/aJUGRP6f5ehnR4B1ykVss=
|
||||
-----END CERTIFICATE-----
|
18
certdir/goodclient.crt
Normal file
18
certdir/goodclient.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC3jCCAkegAwIBAgIJAM9GGWA8iSiIMA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3QwHhcNMTExMTEwMjE0MTQ3WhcN
|
||||
MjExMTA3MjE0MTQ3WjBUMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0
|
||||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQ0wCwYDVQQDEwR0
|
||||
ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCns68NbjKQAnHCpmN6amR1
|
||||
GdtliqiXDaCjoeBPpVXNQ/ZhqinP9gnDyRPXC5kPqw5/6GqNHcYJqg+IIS8G85Rq
|
||||
t3Cs5ZL+JlEDAwd0CkD0Ey5h0oJNfN1bDhV2e/yqc831ElBGK6VItGqKopSUV2y/
|
||||
pNijOOdeMZ8GuktT+9mbAQIDAQABo4G3MIG0MB0GA1UdDgQWBBTE93pAIzHiFRFw
|
||||
IU38WhnwXm03GzCBhAYDVR0jBH0we4AUxPd6QCMx4hURcCFN/FoZ8F5tNxuhWKRW
|
||||
MFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJ
|
||||
bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3SCCQDPRhlgPIko
|
||||
iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKUsXLsp3i9Tsj1wp46R
|
||||
4IkIjwWT1bN3+JOjmA9aqwEVcxTRSStAa5kfTQwc4QSAgHK1oFPsA8gsv3sftYmZ
|
||||
MtvYrvba8cOPonuaCrvtJQMvKgv3d10S6esUGlW+5o3PVPUq5yQ7OaN5JHCDTZGS
|
||||
phuxlq7//rNjvypX2hbKUj6z
|
||||
-----END CERTIFICATE-----
|
18
certdir/goodclient.key
Normal file
18
certdir/goodclient.key
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,D2A0607D6E4CE1FD
|
||||
|
||||
/RMZp/vNTiHiAqVGyByL9Zms7sFWECqpDof6X1jzex7JWi7cjTzKDZiVyqmDfUU3
|
||||
A2v8dbMFQfak4tfpeWqx+HPkVX/GNTFhTI/Ic48+d/9iETwu4d0uMHyrX97GDzWt
|
||||
72NbBdby16s+Lwp7Gu5WQ2fUwJVagHAD4nrHBP5yjOStf6l8CWSiCUTJCfSYxtR4
|
||||
eH3NtnmNE6/E8yodoUJhkNQDcPhP+cbXv5waEYWpoOJQ9G78JeQ+MKI8AEz+19UA
|
||||
vAJDrWBjEgxrKK17qqL8+gxm09RzOt5z4QACt8nsJUV80FCENwIxHOlF8ZXc3Nfz
|
||||
7wX6+F8LEvDL2Tf4fEELcigHnlf3N5/8iRd0MmAiB+4lRW8tYY3TnSS7fVLTJ/RJ
|
||||
C5xdTr80zrM2sgqKbWtPKMSiXWCZGT81FpJ+bne4KAC868sZ71SzG3QiEt72z+On
|
||||
fIN0qB31V0wZB+ZCAU0Me138F9BH7rQALVM619f7OUDMEA2Mbnhej4eblqHnc1MY
|
||||
/JS4HRa6OnSaQJs2KR2+zqadAa9Z1d3dJhVAZ0bPBJ43xCZDuv+33POv1fXJ21us
|
||||
wcy+OrDyEWR27QpWWkOfwvc4txLqxQ4QlNqApIQYV4nWD220ZM9L49KSCqfG2VHN
|
||||
vFhjLKTj/oMKJZll/V58Qc3JPj14FKJD5ODfg2LOFst/vA7UhkV1MRar8rlqzIBa
|
||||
LGl4zgZCDlFlUmiymXmCSC6LrxD78oHT4EMJFk2fK/lAgW5i4E/qFGHUl8rCqNR3
|
||||
Lpo0YYC4hu5hh1aWuxUyMiXQrnCXTbrXj1svTksD/cTCwjRHQ8hpzA==
|
||||
-----END RSA PRIVATE KEY-----
|
BIN
certdir/goodclient.pk8
Normal file
BIN
certdir/goodclient.pk8
Normal file
Binary file not shown.
18
certdir/goodroot.crt
Normal file
18
certdir/goodroot.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7zCCAligAwIBAgIJAOjCfnzSGkPLMA0GCSqGSIb3DQEBBQUAMFkxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMTExMTAyMTQz
|
||||
NTdaFw0yMTExMDcyMTQzNTdaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21l
|
||||
LVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNV
|
||||
BAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApE4i3cM5
|
||||
zVAgfw8juoNN9kh/jiqZexQTUgQUrjQAMStSBVvPeoPcShbXYAZFCkICZlPdRrjY
|
||||
rCyJfdFkII5W+CRh5uNPuv30NDMkCdDYvre02EsOhpmuXaJcUPL24vlTe+9+su4U
|
||||
Hjy7FxOrQLe4S4kB7CNEE0lqLVDr5gXOKGkCAwEAAaOBvjCBuzAdBgNVHQ4EFgQU
|
||||
0Cs8cRK/hNU0+IkSJO+rxuebtmcwgYsGA1UdIwSBgzCBgIAU0Cs8cRK/hNU0+IkS
|
||||
JO+rxuebtmehXaRbMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
|
||||
MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
|
||||
Y2FsaG9zdIIJAOjCfnzSGkPLMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
|
||||
gYEATKWuep0dRQdOwO3QSOYZX3bmbgbMX5rIMn8RT3a/SX4ZD5MSZSqgVOjdmj/I
|
||||
kRnlGTyexXIXgKxps4WefCuU8uFqEfGE/yKRD1Lxy4AVve9soPddKtxTAbq1TNXr
|
||||
A/5bu1Qqf4tSx48qlQkWbj3Okz2yDbWEjYXWoG3ky4CCtfc=
|
||||
-----END CERTIFICATE-----
|
80
certdir/server/pg_hba.conf
Normal file
80
certdir/server/pg_hba.conf
Normal file
@ -0,0 +1,80 @@
|
||||
# PostgreSQL Client Authentication Configuration File
|
||||
# ===================================================
|
||||
#
|
||||
# Refer to the "Client Authentication" section in the
|
||||
# PostgreSQL documentation for a complete description
|
||||
# of this file. A short synopsis follows.
|
||||
#
|
||||
# This file controls: which hosts are allowed to connect, how clients
|
||||
# are authenticated, which PostgreSQL user names they can use, which
|
||||
# databases they can access. Records take one of these forms:
|
||||
#
|
||||
# local DATABASE USER METHOD [OPTIONS]
|
||||
# host DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
|
||||
# hostssl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
|
||||
# hostnossl DATABASE USER CIDR-ADDRESS METHOD [OPTIONS]
|
||||
#
|
||||
# (The uppercase items must be replaced by actual values.)
|
||||
#
|
||||
# The first field is the connection type: "local" is a Unix-domain socket,
|
||||
# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
|
||||
# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
|
||||
#
|
||||
# DATABASE can be "all", "sameuser", "samerole", a database name, or
|
||||
# a comma-separated list thereof.
|
||||
#
|
||||
# USER can be "all", a user name, a group name prefixed with "+", or
|
||||
# a comma-separated list thereof. In both the DATABASE and USER fields
|
||||
# you can also write a file name prefixed with "@" to include names from
|
||||
# a separate file.
|
||||
#
|
||||
# CIDR-ADDRESS specifies the set of hosts the record matches.
|
||||
# It is made up of an IP address and a CIDR mask that is an integer
|
||||
# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
|
||||
# the number of significant bits in the mask. Alternatively, you can write
|
||||
# an IP address and netmask in separate columns to specify the set of hosts.
|
||||
#
|
||||
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", "krb5",
|
||||
# "ident", "pam", "ldap" or "cert". Note that "password" sends passwords
|
||||
# in clear text; "md5" is preferred since it sends encrypted passwords.
|
||||
#
|
||||
# OPTIONS are a set of options for the authentication in the format
|
||||
# NAME=VALUE. The available options depend on the different authentication
|
||||
# methods - refer to the "Client Authentication" section in the documentation
|
||||
# for a list of which options are available for which authentication methods.
|
||||
#
|
||||
# Database and user names containing spaces, commas, quotes and other special
|
||||
# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
|
||||
# "samerole" makes the name lose its special character, and just match a
|
||||
# database or username with that name.
|
||||
#
|
||||
# This file is read on server startup and when the postmaster receives
|
||||
# a SIGHUP signal. If you edit the file on a running system, you have
|
||||
# to SIGHUP the postmaster for the changes to take effect. You can use
|
||||
# "pg_ctl reload" to do that.
|
||||
|
||||
# Put your actual configuration here
|
||||
# ----------------------------------
|
||||
#
|
||||
# If you want to allow non-local connections, you need to add more
|
||||
# "host" records. In that case you will also need to make PostgreSQL listen
|
||||
# on a non-local interface via the listen_addresses configuration parameter,
|
||||
# or via the -i or -h command line switches.
|
||||
#
|
||||
|
||||
# CAUTION: Configuring the system for local "trust" authentication allows
|
||||
# any local user to connect as any PostgreSQL user, including the database
|
||||
# superuser. If you do not trust all your local users, use another
|
||||
# authentication method.
|
||||
|
||||
|
||||
# TYPE DATABASE USER CIDR-ADDRESS METHOD
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all ident
|
||||
# IPv4 local connections:
|
||||
host hostdb all 127.0.0.1/32 md5
|
||||
hostnossl hostnossldb all 127.0.0.1/32 md5
|
||||
hostssl hostssldb all 127.0.0.1/32 md5 clientcert=0
|
||||
hostssl hostsslcertdb all 127.0.0.1/32 md5 clientcert=1
|
||||
hostssl certdb all 127.0.0.1/32 cert
|
18
certdir/server/root.crt
Normal file
18
certdir/server/root.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC3jCCAkegAwIBAgIJAM9GGWA8iSiIMA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3QwHhcNMTExMTEwMjE0MTQ3WhcN
|
||||
MjExMTA3MjE0MTQ3WjBUMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0
|
||||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQ0wCwYDVQQDEwR0
|
||||
ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCns68NbjKQAnHCpmN6amR1
|
||||
GdtliqiXDaCjoeBPpVXNQ/ZhqinP9gnDyRPXC5kPqw5/6GqNHcYJqg+IIS8G85Rq
|
||||
t3Cs5ZL+JlEDAwd0CkD0Ey5h0oJNfN1bDhV2e/yqc831ElBGK6VItGqKopSUV2y/
|
||||
pNijOOdeMZ8GuktT+9mbAQIDAQABo4G3MIG0MB0GA1UdDgQWBBTE93pAIzHiFRFw
|
||||
IU38WhnwXm03GzCBhAYDVR0jBH0we4AUxPd6QCMx4hURcCFN/FoZ8F5tNxuhWKRW
|
||||
MFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJ
|
||||
bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3SCCQDPRhlgPIko
|
||||
iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKUsXLsp3i9Tsj1wp46R
|
||||
4IkIjwWT1bN3+JOjmA9aqwEVcxTRSStAa5kfTQwc4QSAgHK1oFPsA8gsv3sftYmZ
|
||||
MtvYrvba8cOPonuaCrvtJQMvKgv3d10S6esUGlW+5o3PVPUq5yQ7OaN5JHCDTZGS
|
||||
phuxlq7//rNjvypX2hbKUj6z
|
||||
-----END CERTIFICATE-----
|
18
certdir/server/server.crt
Normal file
18
certdir/server/server.crt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7zCCAligAwIBAgIJAOjCfnzSGkPLMA0GCSqGSIb3DQEBBQUAMFkxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMTExMTAyMTQz
|
||||
NTdaFw0yMTExMDcyMTQzNTdaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21l
|
||||
LVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNV
|
||||
BAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEApE4i3cM5
|
||||
zVAgfw8juoNN9kh/jiqZexQTUgQUrjQAMStSBVvPeoPcShbXYAZFCkICZlPdRrjY
|
||||
rCyJfdFkII5W+CRh5uNPuv30NDMkCdDYvre02EsOhpmuXaJcUPL24vlTe+9+su4U
|
||||
Hjy7FxOrQLe4S4kB7CNEE0lqLVDr5gXOKGkCAwEAAaOBvjCBuzAdBgNVHQ4EFgQU
|
||||
0Cs8cRK/hNU0+IkSJO+rxuebtmcwgYsGA1UdIwSBgzCBgIAU0Cs8cRK/hNU0+IkS
|
||||
JO+rxuebtmehXaRbMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
|
||||
MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
|
||||
Y2FsaG9zdIIJAOjCfnzSGkPLMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
|
||||
gYEATKWuep0dRQdOwO3QSOYZX3bmbgbMX5rIMn8RT3a/SX4ZD5MSZSqgVOjdmj/I
|
||||
kRnlGTyexXIXgKxps4WefCuU8uFqEfGE/yKRD1Lxy4AVve9soPddKtxTAbq1TNXr
|
||||
A/5bu1Qqf4tSx48qlQkWbj3Okz2yDbWEjYXWoG3ky4CCtfc=
|
||||
-----END CERTIFICATE-----
|
15
certdir/server/server.key
Normal file
15
certdir/server/server.key
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQCkTiLdwznNUCB/DyO6g032SH+OKpl7FBNSBBSuNAAxK1IFW896
|
||||
g9xKFtdgBkUKQgJmU91GuNisLIl90WQgjlb4JGHm40+6/fQ0MyQJ0Ni+t7TYSw6G
|
||||
ma5dolxQ8vbi+VN7736y7hQePLsXE6tAt7hLiQHsI0QTSWotUOvmBc4oaQIDAQAB
|
||||
AoGAXkP1/QVkxEaUXlFxTjDHKeWuSQJnzBVYgFWXB9sNwSf5htmFz+SXHmq8Znsy
|
||||
YRA+EDdNXKXwqddjiqv3pjYD7q6TgzF4D32/NwZGfF7VzBDj2fXpVxjSMZpsHixq
|
||||
7GIMUTZxzqTlUMmozEFCgHycN84Pw9dmPpJ6FerqsxhPA4ECQQDQfIZuhBhBqinP
|
||||
qHs1ttZQ1VIgJvCnjXXovyQF0fo53xhCqBIHAPQk/zbFDEjdH54e2gSYekBSvtwD
|
||||
Dy9KmjbjAkEAyb//56WAYY3gFYBVDSyCZF5Afax0KS/eDYKlPiF45BtdxhdNTY6M
|
||||
56C1+K3FiAuTMzNUbfXnDq9mZ1lZreX5QwJBAMx1gqS5WMx044Ip2YMI5s7pFRxA
|
||||
8/ttiHeTk/E9RmcgubsM9nj133i07PJ7pK1uR3Q8HQunwJMlZ8B8UMWZzT8CQBD7
|
||||
zcIlZ4pO1DdbJ03FmnByksFBnEG/WtUOU3TIgpHJT/qWCZbm0ivJlqgJkOBkAQ9F
|
||||
We0rzzioQVmf5vHBs1sCQDCEzTU8Ge/BrWtd1EP9JVx7aFY8c5bRvj+3FPp+43Ep
|
||||
5kc1lJK8EINevxykfJ4f94S6GPLuSFfIWEys//WrH14=
|
||||
-----END RSA PRIVATE KEY-----
|
12
codecov.yml
Normal file
12
codecov.yml
Normal file
@ -0,0 +1,12 @@
|
||||
codecov:
|
||||
notify:
|
||||
after_n_builds: 10
|
||||
require_ci_to_pass: false
|
||||
comment:
|
||||
layout: header, changes, diff
|
||||
coverage:
|
||||
status:
|
||||
patch: false
|
||||
range: "60...100"
|
||||
ignore:
|
||||
- "**/translation/message*.java"
|
85
contributors.json
Normal file
85
contributors.json
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
"AlBundy33" : "https://github.com/AlBundy33",
|
||||
"AlexElin" : "https://github.com/AlexElin",
|
||||
"Alexander Kjäll" : "https://github.com/alexanderkjall",
|
||||
"Barnabas Bodnar" : "https://github.com/bbodnar",
|
||||
"Brett Okken" : "https://github.com/bokken",
|
||||
"Brett Wooldridge" : "https://github.com/brettwooldridge",
|
||||
"Chen Huajun" : "https://github.com/ChenHuajun",
|
||||
"Christian Kotzbauer" : "https://github.com/code-chris",
|
||||
"Christian Ullrich" : "https://github.com/chrullrich",
|
||||
"Christoph Berg" : "https://github.com/ChristophBerg",
|
||||
"Christopher Deckers" : "https://github.com/Chrriis",
|
||||
"Daniel Gustafsson" : "https://github.com/danielgustafsson",
|
||||
"Daniel Migowski" : "https://github.com/dmigowski",
|
||||
"Dave Cramer" : "davec@postgresintl.com",
|
||||
"Eric McCormack" : "https://github.com/ericmack",
|
||||
"Florin Asăvoaie" : "https://github.com/FlorinAsavoaie",
|
||||
"George Kankava" : "https://github.com/georgekankava",
|
||||
"Hari Babu Kommi" : "https://github.com/kommiharibabu",
|
||||
"Hugh Cole-Baker" : "https://github.com/sigmaris",
|
||||
"JCzogalla" : "https://github.com/JCzogalla",
|
||||
"Jacques Fuentes" : "https://github.com/jpfuentes2",
|
||||
"James" : "https://github.com/jamesthomp",
|
||||
"Jamie Pullar" : "https://github.com/JamiePullar",
|
||||
"Jan Van den Bergh" : "https://github.com/janvdbergh",
|
||||
"Jeff Klukas" : "https://github.com/jklukas",
|
||||
"Jeremy Whiting" : "https://github.com/whitingjr",
|
||||
"Jesper Pedersen" : "https://github.com/jesperpedersen",
|
||||
"Joe Kutner" : "https://github.com/jkutner",
|
||||
"Jordan Lewis" : "https://github.com/jordanlewis",
|
||||
"Jorge Solorzano" : "https://github.com/jorsol",
|
||||
"Kazuhiro Sera" : "https://github.com/seratch",
|
||||
"KimBisgaardDmi" : "https://github.com/KimBisgaardDmi",
|
||||
"Kyotaro Horiguchi" : "https://github.com/horiguti",
|
||||
"Laurenz Albe" : "https://github.com/laurenz",
|
||||
"Magnus" : "https://github.com/magJ",
|
||||
"Magnus Hagander" : "https://github.com/mhagander",
|
||||
"Marc Petzold" : "https://github.com/dosimeta",
|
||||
"Marc Slemko" : "https://github.com/znep",
|
||||
"Marios Trivyzas" : "https://github.com/matriv",
|
||||
"Mathias Fußenegger" : "https://github.com/mfussenegger",
|
||||
"Michael Glaesemann" : "https://github.com/grzm",
|
||||
"MichaelZg" : "https://github.com/michaelzg",
|
||||
"Michele Mancioppi" : "https://github.com/michele-mancioppi",
|
||||
"Minglei Tu" : "https://github.com/tminglei",
|
||||
"Pavel Raiskup" : "https://github.com/praiskup",
|
||||
"Pawel" : "https://github.com/veselov",
|
||||
"Petro Semeniuk" : "https://github.com/PetroSemeniuk",
|
||||
"Philippe Marschall" : "https://github.com/marschall",
|
||||
"Piyush Sharma" : "https://github.com/ps-sp",
|
||||
"Rikard Pavelic" : "https://github.com/zapov",
|
||||
"Robert 'Bobby' Zenz" : "https://github.com/RobertZenz",
|
||||
"Robert Zenz" : "https://github.com/RobertZenz",
|
||||
"Roman Ivanov" : "https://github.com/romani",
|
||||
"Sebastian Utz" : "https://github.com/seut",
|
||||
"Sehrope Sarkuni" : "https://github.com/sehrope",
|
||||
"Selene Feigl" : "https://github.com/sfeigl",
|
||||
"Sidi Mohamed EL AATIFI" : "https://github.com/elaatifi",
|
||||
"Simon Stelling" : "https://github.com/stellingsimon",
|
||||
"Stephen Nelson" : "https://github.com/lordnelson",
|
||||
"Steve Ungerer" : "https://github.com/scubasau",
|
||||
"Tanya Gordeeva" : "https://github.com/tmgordeeva",
|
||||
"Thach Hoang" : "https://github.com/thachhoang",
|
||||
"Trygve Laugstøl" : "https://github.com/trygvis",
|
||||
"Vladimir Gordiychuk" : "https://github.com/Gordiychuk",
|
||||
"Vladimir Sitnikov" : "https://github.com/vlsi",
|
||||
"Zemian Deng" : "https://github.com/zemian",
|
||||
"aryabukhin" : "https://github.com/aryabukhin",
|
||||
"bazzargh" : "https://github.com/bazzargh",
|
||||
"bd-infor" : "https://github.com/bd-infor",
|
||||
"benbenw" : "https://github.com/benbenw",
|
||||
"benoit" : "https://github.com/benbenw",
|
||||
"bpd0018" : "https://github.com/bpd0018",
|
||||
"chalda" : "https://github.com/ochaloup",
|
||||
"djydewang" : "https://github.com/djydewang",
|
||||
"eperez" : "https://github.com/eperez",
|
||||
"goeland86" : "https://github.com/goeland86",
|
||||
"mjanczykowski" : "https://github.com/mjanczykowski",
|
||||
"rnveach" : "https://github.com/rnveach",
|
||||
"slmsbrhgn" : "https://github.com/slmsbrhgn",
|
||||
"trtrmitya" : "https://github.com/trtrmitya",
|
||||
"zapov" : "https://github.com/zapov",
|
||||
"Álvaro Hernández Tortosa" : "https://github.com/ahachete",
|
||||
"Étienne BERSAC" : "https://github.com/bersace"
|
||||
}
|
1
docs/.gitignore
vendored
Normal file
1
docs/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
_site
|
11
docs/_config.yml
Normal file
11
docs/_config.yml
Normal file
@ -0,0 +1,11 @@
|
||||
name: PostgreSQL JDBC Driver website
|
||||
markdown: redcarpet
|
||||
redcarpet:
|
||||
extensions:
|
||||
- tables
|
||||
highlighter: pygments
|
||||
excerpt_separator: <!--more-->
|
||||
exclude:
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- README.md
|
9
docs/_includes/submenu_about.html
Normal file
9
docs/_includes/submenu_about.html
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="pgSideWrap">
|
||||
<div id="pgSideNav">
|
||||
<ul>
|
||||
<li><a href="about.html">About</a></li>
|
||||
<li><a href="license.html">License</a></li>
|
||||
<li><a href="extras.html">Extras</a></li>
|
||||
</ul>
|
||||
</div> <!-- pgSideNam -->
|
||||
</div> <!-- pgSideWrap -->
|
9
docs/_includes/submenu_community.html
Normal file
9
docs/_includes/submenu_community.html
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="pgSideWrap">
|
||||
<div id="pgSideNav">
|
||||
<ul>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="mailinglist.html">Mailing List</a></li>
|
||||
<li><a href="contributors.html">Contributors</a></li>
|
||||
</ul>
|
||||
</div> <!-- pgSideNam -->
|
||||
</div> <!-- pgSideWrap -->
|
12
docs/_includes/submenu_development.html
Normal file
12
docs/_includes/submenu_development.html
Normal file
@ -0,0 +1,12 @@
|
||||
<div id="pgSideWrap">
|
||||
<div id="pgSideNav">
|
||||
<ul>
|
||||
<li><a href="development.html">Development</a></li>
|
||||
<li><a href="git.html">GIT</a></li>
|
||||
<li><a href="translations.html">Translations</a></li>
|
||||
<li><a href="website.html">Website</a></li>
|
||||
<li><a href="todo.html">Todo</a></li>
|
||||
<li><a href="privateapi/index.html">Private API</a></li>
|
||||
</ul>
|
||||
</div> <!-- pgSideNam -->
|
||||
</div> <!-- pgSideWrap -->
|
10
docs/_includes/submenu_documentation.html
Normal file
10
docs/_includes/submenu_documentation.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div id="pgSideWrap">
|
||||
<div id="pgSideNav">
|
||||
<ul>
|
||||
<li><a href="documentation.html">Documentation</a></li>
|
||||
<li><a href="changelog.html">Changelog</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="publicapi/index.html">Public API</a></li>
|
||||
</ul>
|
||||
</div> <!-- pgSideNam -->
|
||||
</div> <!-- pgSideWrap -->
|
9
docs/_layouts/changes.html
Normal file
9
docs/_layouts/changes.html
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% include submenu_documentation.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
{{ content }}
|
||||
</div> <!-- pgContentWrap -->
|
108
docs/_layouts/default.html
Normal file
108
docs/_layouts/default.html
Normal file
@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
|
||||
<head>
|
||||
<title>{{ page.title }}</title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
|
||||
<meta name="description" content="The official site for the PostgreSQL JDBC Driver" />
|
||||
<meta name="copyright" content="The PostgreSQL Global Development Group" />
|
||||
|
||||
<style type="text/css" media="screen" title="Normal Text">@import url("{{ page.resource }}/css/base.css");</style>
|
||||
|
||||
<link rel="shortcut icon" href="{{ page.resource }}/favicon.ico" />
|
||||
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-1345454-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="pgContainerWrap">
|
||||
<div id="pgContainer">
|
||||
|
||||
<span class="txtOffScreen"><a href="#pgContent" title="Skip site navigation" accesskey="1">Skip site navigation</a> (1)</span>
|
||||
<span class="txtOffScreen"><a href="#pgContentWrap" title="Skip section navigation" accesskey="2">Skip section navigation</a> (2)</span>
|
||||
|
||||
<div id="pgHeaderContainer">
|
||||
|
||||
<div id="pgSearch">
|
||||
|
||||
<!-- Old pgjdbc form -->
|
||||
<form action="https://www.google.com/search" method="get">
|
||||
<input value="jdbc.postgresql.org" name="sitesearch" type="hidden" />
|
||||
<input id="q" name="q" type="text" size="20" maxlength="255" onfocus="if( this.value==this.defaultValue ) this.value='';" value="Google Search" accesskey="s" />
|
||||
<!-- <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google"> -->
|
||||
<input name="Search" value="Search" type="submit" />
|
||||
</form>
|
||||
|
||||
<!-- New PostgreSQL form
|
||||
<form method="get" action="search/">
|
||||
<div>
|
||||
<h2 class="pgBlockHide"><label for="q">Search</label></h2>
|
||||
<input id="q" name="q" type="text" size="20" maxlength="255" onfocus="if( this.value==this.defaultValue ) this.value='';" value="Search" accesskey="s" />
|
||||
<input name="a" type="hidden" value="1"/>
|
||||
<input id="submit" name="submit" type="submit" value="Search" />
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
|
||||
</div> <!-- pgSearch -->
|
||||
<br />
|
||||
|
||||
<div id="pgHeader">
|
||||
<div id="pgHeaderLogoLeft">
|
||||
<img alt="PostgreSQL" height="80" width="390" src="{{ page.resource }}/img/layout/hdr_left3.png" usemap="#maplinks" />
|
||||
<map name="maplinks">
|
||||
<area shape="rect" coords="0,0,231,80" alt="PostgreSQL" href="https://postgresql.org" />
|
||||
<area shape="rect" coords="232,0,390,80" alt="PostgreSQL JDBC Driver" href="https://jdbc.postgresql.org" />
|
||||
</map>
|
||||
</div>
|
||||
<div id="pgHeaderLogoRight">
|
||||
<a href="https://postgresql.org">
|
||||
<img width="210" height="80" alt="The world's most advanced open source database." src="{{ page.resource }}/img/layout/hdr_right.png" />
|
||||
</a>
|
||||
</div>
|
||||
</div> <!-- pgHeader -->
|
||||
|
||||
<div id="pgTopNav">
|
||||
<div id="pgTopNavLeft">
|
||||
<img width="7" style="height: 100%;" alt="" src="{{ page.resource }}/img/layout/nav_lft.png" />
|
||||
</div>
|
||||
<div id="pgTopNavRight">
|
||||
<img width="7" style="height: 100%;" alt="" src="{{ page.resource }}/img/layout/nav_rgt.png" />
|
||||
</div>
|
||||
<ul id="pgTopNavList">
|
||||
<li><a href="{{ page.nav }}index.html" title="Home">Home</a></li>
|
||||
<li><a href="{{ page.nav }}about/about.html" title="About">About</a></li>
|
||||
<li><a href="{{ page.nav }}download.html" title="Download">Download</a></li>
|
||||
<li><a href="{{ page.nav }}documentation/documentation.html" title="Documentation">Documentation</a></li>
|
||||
<li><a href="{{ page.nav }}community/community.html" title="Community">Community</a></li>
|
||||
<li><a href="{{ page.nav }}development/development.html" title="Development">Development</a></li>
|
||||
</ul>
|
||||
</div> <!-- pgTopNav -->
|
||||
</div> <!-- pgHeaderContainer -->
|
||||
|
||||
<div id="pgContent">
|
||||
{{ content }}
|
||||
|
||||
<br class="pgClearBoth" />
|
||||
</div> <!-- pgContent -->
|
||||
<hr />
|
||||
|
||||
<div id="pgFooter">
|
||||
<a class="navFooter" href="https://www.postgresql.org/about/privacypolicy">Privacy Policy</a> |
|
||||
<a class="navFooter" href="https://www.postgresql.org/about/">About PostgreSQL</a><br/>
|
||||
Copyright © 1996-{{ site.time | date: "%Y" }} The PostgreSQL Global Development Group
|
||||
</div> <!-- pgFooter -->
|
||||
</div> <!-- pgContainer -->
|
||||
</div> <!-- pgContainerWrap -->
|
||||
</body>
|
||||
</html>
|
91
docs/_layouts/default_docs.html
Normal file
91
docs/_layouts/default_docs.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ page.title }}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="The official documentation for the PostgreSQL JDBC Driver" />
|
||||
<meta name="copyright" content="The PostgreSQL Global Development Group" />
|
||||
|
||||
<style type="text/css" media="screen" title="Normal Text">@import url("media/css/docs.css");</style>
|
||||
<link rel="stylesheet" type="text/css" href="{{ page.resource }}/css/syntax.css">
|
||||
|
||||
<link rel="shortcut icon" href="{{ page.resource }}/favicon.ico" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="docHeader">
|
||||
<div id="docHeaderLogo">
|
||||
<a href="https://jdbc.postgresql.org/" title="PostgreSQL JDBC Driver"><img src="media/img/layout/hdr_left3a.png" alt="PostgreSQL" height="80" width="390" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="docContainerWrap">
|
||||
<div id="docContainer">
|
||||
<div id="docContent">
|
||||
|
||||
<div class="NAVHEADER">
|
||||
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="3" valign="bottom" align="center">
|
||||
<h2 class="TITLE">{{ page.header }}</h2>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="20%" align="left">
|
||||
<a title="{{ page.previoustitle }}" href="{{ page.previous }}" accesskey="P">Prev</a>
|
||||
</td>
|
||||
<td valign="bottom" width="60%" align="center"> </td>
|
||||
<td valign="top" width="20%" align="right">
|
||||
<a title="{{ page.nexttitle }}" href="{{ page.next }}" accesskey="N">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="c1" width="100%" />
|
||||
</div> <!-- NAVHEADER -->
|
||||
|
||||
<div class="CHAPTER">
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
<div class="NAVFOOTER">
|
||||
<hr class="c1" width="100%" />
|
||||
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="33%" align="left">
|
||||
<a href="{{ page.previous }}" accesskey="P">Prev</a>
|
||||
</td>
|
||||
<td valign="top" width="34%" align="center">
|
||||
<a href="index.html" accesskey="H">Home</a>
|
||||
</td>
|
||||
<td valign="top" width="33%" align="right">
|
||||
<a href="{{ page.next }}" accesskey="N">Next</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="33%" align="left">{{ page.previoustitle }}</td>
|
||||
<td valign="top" width="34%" align="center"> </td>
|
||||
<td valign="top" width="33%" align="right">{{ page.nexttitle }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- NAVFOOTER -->
|
||||
|
||||
|
||||
</div> <!-- docContent -->
|
||||
|
||||
<div id="docComments"></div>
|
||||
|
||||
<div id="docFooter">
|
||||
<a class="navFooter" href="https://www.postgresql.org/about/privacypolicy">Privacy Policy</a> |
|
||||
<a class="navFooter" href="https://www.postgresql.org/about/">About PostgreSQL</a><br/>
|
||||
Copyright © 1996-{{ site.time | date: "%Y" }} The PostgreSQL Global Development Group
|
||||
</div> <!-- pgFooter -->
|
||||
</div> <!-- docContainer -->
|
||||
</div> <!-- docContainer -->
|
||||
</body>
|
||||
</html>
|
18
docs/_layouts/documents.html
Normal file
18
docs/_layouts/documents.html
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% include submenu_documentation.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Documentation</h1>
|
||||
<p>
|
||||
This website contains the latest, most up to date version of the documentation.
|
||||
In general we hope the documentation here is accurate and makes reference to
|
||||
specific version compatibility issues, but we know this isn't always true. In
|
||||
some cases it may be valuable to refer to the documentation written for your
|
||||
specific driver version.
|
||||
</p>
|
||||
|
||||
{{ content }}
|
||||
</div> <!-- pgContentWrap -->
|
8
docs/_layouts/downloads.html
Normal file
8
docs/_layouts/downloads.html
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<br />
|
||||
<div>
|
||||
{{ content }}
|
||||
</div>
|
9
docs/_layouts/faqs.html
Normal file
9
docs/_layouts/faqs.html
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% include submenu_documentation.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
{{ content }}
|
||||
</div> <!-- pgContentWrap -->
|
9
docs/_layouts/todos.html
Normal file
9
docs/_layouts/todos.html
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
{{ content }}
|
||||
</div> <!-- pgContentWrap -->
|
148
docs/_posts/2017-02-20-42.0.0-release.md
Normal file
148
docs/_posts/2017-02-20-42.0.0-release.md
Normal file
@ -0,0 +1,148 @@
|
||||
---
|
||||
title: "PostgreSQL JDBC Driver 42.0.0 Released"
|
||||
date: 2017-02-20 00:00:00 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.0.0
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Added
|
||||
- Replication protocol API was added: [replication API documentation](https://jdbc.postgresql.org//documentation/head/replication.html). [PR 550](https://github.com/pgjdbc/pgjdbc/pull/550)
|
||||
- java.util.logging is now used for logging: [logging documentation](https://jdbc.postgresql.org//documentation/head/logging.html). [PR 722](https://github.com/pgjdbc/pgjdbc/pull/722)
|
||||
- Add support for PreparedStatement.setCharacterStream(int, Reader). [ee4c4265](https://github.com/pgjdbc/pgjdbc/commit/ee4c4265aebc1c73a1d1fabac5ba259d1fbfd1e4)
|
||||
|
||||
### Changed
|
||||
- Version bumped to 42.0.0 to avoid version clash with PostgreSQL version and follow a better sematic versioning. [46634923](https://github.com/pgjdbc/pgjdbc/commit/466349236622c6b03bb9cd8d7f517c3ce0586751)
|
||||
- Ensure executeBatch() can be used with pgbouncer. Previously pgjdbc could use server-prepared statements for batch execution even with prepareThreshold=0. [Issue 742](https://github.com/pgjdbc/pgjdbc/issues/742)
|
||||
- Error position is displayed when SQL has unterminated literals, comments, etc. [Issue 688](https://github.com/pgjdbc/pgjdbc/issues/688)
|
||||
- Strict handling of accepted values in getBoolean and setObject(BOOLEAN), now it follows PostgreSQL accepted values, only 1 and 0 for numeric types are acepted (previusly !=0 was true). [PR 732](https://github.com/pgjdbc/pgjdbc/pull/732)
|
||||
- Return correct versions and name of the driver. [PR 668](https://github.com/pgjdbc/pgjdbc/pull/668)
|
||||
|
||||
### Removed
|
||||
- Support for PostgreSQL versions below 8.2 was dropped. [PR 661](https://github.com/pgjdbc/pgjdbc/pull/661)
|
||||
|
||||
### Deprecated
|
||||
- Deprecated PGPoolingDataSource, instead of this class you should use a fully featured connection pool like HikariCP, vibur-dbcp, commons-dbcp, c3p0, etc. [PR 739](https://github.com/pgjdbc/pgjdbc/pull/739)
|
||||
|
||||
### Regressions
|
||||
- Data truncated in setCharacterStream. Fixed in 42.1.0
|
||||
- No suitable driver found for jdbc:postgresql when using a DataSource implementation. Fixed in 42.1.0
|
||||
|
||||
<br>
|
||||
You may have noticed the change in the versioning of the driver, you can [read the FAQ](documentation/faq.html#versioning) for more information.
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlexElin (6):
|
||||
|
||||
* refactor: use varargs [PR 681](https://github.com/pgjdbc/pgjdbc/pull/681) [50b7fe0f](https://github.com/pgjdbc/pgjdbc/commit/50b7fe0fe901ee24160615bebd4b86603b960b86)
|
||||
* refactor: make HostChooser implement Iterable [PR 645](https://github.com/pgjdbc/pgjdbc/pull/645) [3d37db78](https://github.com/pgjdbc/pgjdbc/commit/3d37db78ae4a82cab8809bac86e3b55537e91d95)
|
||||
* refactor: migrate to Junit4 [PR 682](https://github.com/pgjdbc/pgjdbc/pull/682) [f4a067cc](https://github.com/pgjdbc/pgjdbc/commit/f4a067cc5d32dde2698a062d6f9855d50fa3127d)
|
||||
* refactor: remove deprecated Utils' methods [PR 678](https://github.com/pgjdbc/pgjdbc/pull/678) [0275d40f](https://github.com/pgjdbc/pgjdbc/commit/0275d40f6f2b8b30faef8aed31761e1ff7a0ed90)
|
||||
* refactor: migrate tests to junit4 [PR 685](https://github.com/pgjdbc/pgjdbc/pull/685) [faab4998](https://github.com/pgjdbc/pgjdbc/commit/faab499853c56f67cb70fb242f75b918452f2a6f)
|
||||
* refactor: remove checks for jdk version 1.4 (tests) [PR 737](https://github.com/pgjdbc/pgjdbc/pull/737) [ee51dfce](https://github.com/pgjdbc/pgjdbc/commit/ee51dfce99dcd922b66373cd0c69c83bf339dbdb)
|
||||
|
||||
Eric McCormack (1):
|
||||
|
||||
* fix: accept server version with more than 3 parts [PR 741](https://github.com/pgjdbc/pgjdbc/pull/741) [8437f6c1](https://github.com/pgjdbc/pgjdbc/commit/8437f6c1c76c3560331d75c4332ab50959d57228)
|
||||
|
||||
Jordan Lewis (1):
|
||||
|
||||
* feat: do not use pg_depend against PostgreSQL 9.0+ [PR 689](https://github.com/pgjdbc/pgjdbc/pull/689) [62e25fba](https://github.com/pgjdbc/pgjdbc/commit/62e25fba70002d7639472c5a1dcd9d1de5b7f872)
|
||||
|
||||
Jorge Solorzano (22):
|
||||
|
||||
* refactor: remove support for postgresql < 8.2 [PR 661](https://github.com/pgjdbc/pgjdbc/pull/661) [14e64be7](https://github.com/pgjdbc/pgjdbc/commit/14e64be7dc43feaef210e82fcd9b6089e54e5e4f)
|
||||
* fix: add query to support postgresql 8.2 without t.typarray [PR 699](https://github.com/pgjdbc/pgjdbc/pull/699) [cb3995b5](https://github.com/pgjdbc/pgjdbc/commit/cb3995b5a0311a2f5f7737fdfe83457680305efb)
|
||||
* test: add CI tests against PostgreSQL 8.3 [PR 710](https://github.com/pgjdbc/pgjdbc/pull/710) [436365b0](https://github.com/pgjdbc/pgjdbc/commit/436365b095d0a276b876433fd00d9bbac72708cc)
|
||||
* fix: robust castToBoolean for setObject in PreparedStatement [PR 714](https://github.com/pgjdbc/pgjdbc/pull/714) [edc2a14a](https://github.com/pgjdbc/pgjdbc/commit/edc2a14af8837911a48bb322363bb8b70d2b173d)
|
||||
* refactor: remove unused V2ReplicationProtocol.java [PR 718](https://github.com/pgjdbc/pgjdbc/pull/718) [7881e41e](https://github.com/pgjdbc/pgjdbc/commit/7881e41ea93f3bd6a3f58e85cb4329f77b667db0)
|
||||
* test: ignore tests that don't apply to Pg8.2 and Pg8.3 [PR 703](https://github.com/pgjdbc/pgjdbc/pull/703) [3bc0951e](https://github.com/pgjdbc/pgjdbc/commit/3bc0951e84ad3b7af746e2dece04b4ea816605e2)
|
||||
* style: reorder checkstyle in travis [PR 721](https://github.com/pgjdbc/pgjdbc/pull/721) [ba812fb4](https://github.com/pgjdbc/pgjdbc/commit/ba812fb404852b73a304f7ccb068a2030b8604b3)
|
||||
* refactor: remove charset property not used [PR 709](https://github.com/pgjdbc/pgjdbc/pull/709) [f6fd5a5a](https://github.com/pgjdbc/pgjdbc/commit/f6fd5a5abea1efe9b987825b7874ffd962772197)
|
||||
* fix: huntbugs on PgDatabaseMetaData, String concatenation in a loop [PR 693](https://github.com/pgjdbc/pgjdbc/pull/693) [3a00ef94](https://github.com/pgjdbc/pgjdbc/commit/3a00ef9436c6b04c472330802a8adb22adaa9b63)
|
||||
* refactor: fix getDriverVersion, getDriverName and getJDBCMajor/MinorVersion methods [PR 668](https://github.com/pgjdbc/pgjdbc/pull/668) [aa974341](https://github.com/pgjdbc/pgjdbc/commit/aa9743417f18a10a1a7c7a4bc25ad2862155ddc8)
|
||||
* docs: reword supported versions, include datasources section, compare versions [PR 673](https://github.com/pgjdbc/pgjdbc/pull/673) [b2cdd057](https://github.com/pgjdbc/pgjdbc/commit/b2cdd057664a00928d97290ed7435fcf57f3a360)
|
||||
* test: fix test replication on PG_HEAD [PR 734](https://github.com/pgjdbc/pgjdbc/pull/734) [3b406a18](https://github.com/pgjdbc/pgjdbc/commit/3b406a18a7c1751aa477e8378ee8cad0a60efd1e)
|
||||
* refactor: deprecated PGPoolingDataSource [PR 739](https://github.com/pgjdbc/pgjdbc/pull/739) [55e2cd16](https://github.com/pgjdbc/pgjdbc/commit/55e2cd16cc7e30b1370e777d71556aa625bace9f)
|
||||
* fix: strict handling of getBoolean and setObject with postgres accepted values [PR 732](https://github.com/pgjdbc/pgjdbc/pull/732) [4942f7d1](https://github.com/pgjdbc/pgjdbc/commit/4942f7d1cc812feeeca331878334a3d4058615e4)
|
||||
* docs: move docs from www/documentation/head [PR 744](https://github.com/pgjdbc/pgjdbc/pull/744) [70e23c45](https://github.com/pgjdbc/pgjdbc/commit/70e23c45c904ebded42ab1b5efc10d66f34ab68c)
|
||||
* test: fix replication test in Pg10 [PR 746](https://github.com/pgjdbc/pgjdbc/pull/746) [63ed2129](https://github.com/pgjdbc/pgjdbc/commit/63ed2129f7aa4375d009f19c64dc2404e725aabb)
|
||||
* feat: use java.util.logging [PR 722](https://github.com/pgjdbc/pgjdbc/pull/722) [43e6505e](https://github.com/pgjdbc/pgjdbc/commit/43e6505e3aa16e6acdf08f02f2dd1e3cf131ac3e)
|
||||
* perf: short circuit Oid.BOOL in getBoolean [PR 745](https://github.com/pgjdbc/pgjdbc/pull/745) [e69e4a1d](https://github.com/pgjdbc/pgjdbc/commit/e69e4a1d5502319bc810e0e4529611ba52ea386c)
|
||||
* fix: add isLoggable around parameterized logger [PR 752](https://github.com/pgjdbc/pgjdbc/pull/752) [8b50cfe5](https://github.com/pgjdbc/pgjdbc/commit/8b50cfe58c47d19adc0c241488a24037f4a4416f)
|
||||
* docs: move www repository to pgjdbc/docs [d4e99198](https://github.com/pgjdbc/pgjdbc/commit/d4e99198336bf41fc7f3fe9c0746036d5477601c)
|
||||
* add syntax highlight to documentation [8c035ade](https://github.com/pgjdbc/pgjdbc/commit/8c035adeb820c8a19e372f0b76a70e511b657cad)
|
||||
* add more style [9c510e65](https://github.com/pgjdbc/pgjdbc/commit/9c510e65f573354a47b7e94553870231e8dc2935)
|
||||
|
||||
Pavel Raiskup (3):
|
||||
|
||||
* fix: sync with latest Fedora [PR 637](https://github.com/pgjdbc/pgjdbc/pull/637) [a29ad80b](https://github.com/pgjdbc/pgjdbc/commit/a29ad80bcfdd65d11257f6339eb6bf2512612eed)
|
||||
* packaging: rpm: update srpm generator [5c3c9239](https://github.com/pgjdbc/pgjdbc/commit/5c3c92392d66608ed7d9d1f96eb5b380e2667cd9)
|
||||
* packaging: rpm_ci: use curl -L to download rawhide logs [c8125cff](https://github.com/pgjdbc/pgjdbc/commit/c8125cff3ae719675983185d49cd49e6c028d7b7)
|
||||
|
||||
Philippe Marschall (3):
|
||||
|
||||
* refactor: clean up PgDatabaseMetaData [PR 692](https://github.com/pgjdbc/pgjdbc/pull/692) [d32b077e](https://github.com/pgjdbc/pgjdbc/commit/d32b077e20b2afae9c4c80f704f7c8a26a8b8e11)
|
||||
* refactor: delete Keyword enum [PR 697](https://github.com/pgjdbc/pgjdbc/pull/697) [677e3c4c](https://github.com/pgjdbc/pgjdbc/commit/677e3c4cf2533ce283a2d444cee6da8a94a4ca82)
|
||||
* feat: support microsecond resolution for JSR-310 types [PR 691](https://github.com/pgjdbc/pgjdbc/pull/691) [6b3a1efb](https://github.com/pgjdbc/pgjdbc/commit/6b3a1efb36709e570caf0dc71a42a53e89f5a5e0)
|
||||
|
||||
Roman Ivanov (2):
|
||||
|
||||
* config: move version of checkstyle to property [PR 723](https://github.com/pgjdbc/pgjdbc/pull/723) [9ef7d6f1](https://github.com/pgjdbc/pgjdbc/commit/9ef7d6f1f274a75a14b380c57f4c140b47b25888)
|
||||
* chore: upgrade checkstyle to 7.4, make checkstyle version configurable via property [PR 725](https://github.com/pgjdbc/pgjdbc/pull/725) [e1a25782](https://github.com/pgjdbc/pgjdbc/commit/e1a2578247684667a51bc34ee53449e4457755df)
|
||||
|
||||
Steve Ungerer (1):
|
||||
|
||||
* fix: ensure executeBatch() does not use server-side prepared statements when prepareThreshold=0 [PR 690](https://github.com/pgjdbc/pgjdbc/pull/690) [aca26a07](https://github.com/pgjdbc/pgjdbc/commit/aca26a07026e9b289a209799ab28131a33b296dd)
|
||||
|
||||
Trygve Laugstøl (1):
|
||||
|
||||
* feat: connect the socket only if the socket factory created an unconnected socket [PR 587](https://github.com/pgjdbc/pgjdbc/pull/587) [f75572be](https://github.com/pgjdbc/pgjdbc/commit/f75572beb8b59a7a73f6e1d12d692b483dc04c85)
|
||||
|
||||
Vladimir Gordiychuk (4):
|
||||
|
||||
* bug: fix not enscaped special symbol that fail build [PR 686](https://github.com/pgjdbc/pgjdbc/pull/686) [b4604cd7](https://github.com/pgjdbc/pgjdbc/commit/b4604cd7de0c297c8b56608642055ed6eb3645e0)
|
||||
* feat: add replication protocol API [PR 550](https://github.com/pgjdbc/pgjdbc/pull/550) [f48c6bb7](https://github.com/pgjdbc/pgjdbc/commit/f48c6bb7e726479bbf4be4ef95e4c138db5cac96)
|
||||
* test: fix drop replication slot on 9.4 for tests [PR 696](https://github.com/pgjdbc/pgjdbc/pull/696) [c1c48bd7](https://github.com/pgjdbc/pgjdbc/commit/c1c48bd705f04e8d1b1cb8b998dda0a6893f891d)
|
||||
* chore: Gather backtrace from core dump on CI [PR 736](https://github.com/pgjdbc/pgjdbc/pull/736) [da5e4ef1](https://github.com/pgjdbc/pgjdbc/commit/da5e4ef1cbc4a5c9f41e9aee8d183560ba679541)
|
||||
|
||||
Vladimir Sitnikov (12):
|
||||
|
||||
* fedora: add BuildRequires: classloader-leak-test-framework [64b6750c](https://github.com/pgjdbc/pgjdbc/commit/64b6750cbd49ca8a9f0596bed1876132b64c34d4)
|
||||
* tests: remove Class.forName(..driver..) from test code [c99507b5](https://github.com/pgjdbc/pgjdbc/commit/c99507b5661804b5b1b2340ba747fe553dc37a68)
|
||||
* test: add CI tests against PostgreSQL 8.2 [PR 659](https://github.com/pgjdbc/pgjdbc/pull/659) [63ee60e2](https://github.com/pgjdbc/pgjdbc/commit/63ee60e2ad93441ff55dab08213cc09815b614e0)
|
||||
* feat: display error position when SQL has unterminated literals, comments, etc [PR 688](https://github.com/pgjdbc/pgjdbc/pull/688) [8a95d991](https://github.com/pgjdbc/pgjdbc/commit/8a95d991e2032cf0406be8e54e70cfafaad794b5)
|
||||
* feat: add support for PreparedStatement.setCharacterStream(int, Reader) [PR 671](https://github.com/pgjdbc/pgjdbc/pull/671) [ee4c4265](https://github.com/pgjdbc/pgjdbc/commit/ee4c4265aebc1c73a1d1fabac5ba259d1fbfd1e4)
|
||||
* chore: update next version to 42.0.0-SNAPSHOT [46634923](https://github.com/pgjdbc/pgjdbc/commit/466349236622c6b03bb9cd8d7f517c3ce0586751)
|
||||
* refactor: add CallableQueryKey#equals override [401c51a1](https://github.com/pgjdbc/pgjdbc/commit/401c51a15d80d2f24cddbe5cd4b2ca7509a0a765)
|
||||
* doc: correct wording in readme regarding PostgreSQL versions used in pgjdbc regression testing [60391d75](https://github.com/pgjdbc/pgjdbc/commit/60391d7559d6ee4e579ec2e36d7aa8199a99189d)
|
||||
* fix: revert ExpressionProperties to Properties in BaseDataSource [989b4d23](https://github.com/pgjdbc/pgjdbc/commit/989b4d235ec6776f31284d15618195cf7f8a7a79)
|
||||
* fix: correct edge cases for setCharacterStream(int, Reader) [f1190d8c](https://github.com/pgjdbc/pgjdbc/commit/f1190d8c2eb1c506616e2298aabad211ba3bdb0a)
|
||||
* test: add SharedTimerClassLoaderLeakTest to the regular test suite [b3553276](https://github.com/pgjdbc/pgjdbc/commit/b3553276ad48cbb47cd4849d3a08b7ee61be8ace)
|
||||
* refactor: wrap more log statements with isLoggable check [07d225ec](https://github.com/pgjdbc/pgjdbc/commit/07d225ec1028d945533d5023702b3865aee54ad6)
|
||||
|
||||
bd-infor (1):
|
||||
|
||||
* docs: clarify handling of loglevel [PR 711](https://github.com/pgjdbc/pgjdbc/pull/711) [6334bac0](https://github.com/pgjdbc/pgjdbc/commit/6334bac036efaa4a9f2a445f1cbdcc310f4c6263)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[bd-infor](https://github.com/bd-infor)
|
||||
[Eric McCormack](https://github.com/ericmack)
|
||||
[Jordan Lewis](https://github.com/jordanlewis)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Pavel Raiskup](https://github.com/praiskup)
|
||||
[Philippe Marschall](https://github.com/marschall)
|
||||
[Roman Ivanov](https://github.com/romani)
|
||||
[Steve Ungerer](https://github.com/scubasau)
|
||||
[Trygve Laugstøl](https://github.com/trygvis)
|
||||
[Vladimir Gordiychuk](https://github.com/Gordiychuk)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
97
docs/_posts/2017-05-04-42.1.0-release.md
Normal file
97
docs/_posts/2017-05-04-42.1.0-release.md
Normal file
@ -0,0 +1,97 @@
|
||||
---
|
||||
title: "PostgreSQL JDBC Driver 42.1.0 Released"
|
||||
date: 2017-05-04 00:00:00 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.1.0
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Added
|
||||
- Support fetching a REF_CURSOR using getObject [PR 809](https://github.com/pgjdbc/pgjdbc/pull/809)
|
||||
|
||||
### Fixed
|
||||
- Fix data being truncated in setCharacterStream (bug introduced in 42.0.0) [PR 802](https://github.com/pgjdbc/pgjdbc/pull/802)
|
||||
- Fix calculation of lastReceiveLSN for logical replication [PR 801](https://github.com/pgjdbc/pgjdbc/pull/801)
|
||||
- Make sure org.postgresql.Driver is loaded when accessing though DataSource interface [Issue 768](https://github.com/pgjdbc/pgjdbc/issues/768)
|
||||
|
||||
### Regressions
|
||||
- There's no 42.1.0.jre6 version due to infinity handling bug. Fixed in 42.1.1.jre6
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Alexander Kjäll (1):
|
||||
|
||||
* documentation typo [PR 818](https://github.com/pgjdbc/pgjdbc/pull/818) [90f5556f](https://github.com/pgjdbc/pgjdbc/commit/90f5556fd3de2395971496fc4b0b4cacd5d5d562)
|
||||
|
||||
Daniel Migowski (1):
|
||||
|
||||
* feat: improve waiting for notifications by providing a timeout option [PR 778](https://github.com/pgjdbc/pgjdbc/pull/778) [a7e0c83b](https://github.com/pgjdbc/pgjdbc/commit/a7e0c83be93600c6299ae99907942e2530cb5e30)
|
||||
|
||||
Dave Cramer (4):
|
||||
|
||||
* Update index.html [4d8b1b38](https://github.com/pgjdbc/pgjdbc/commit/4d8b1b381d8e2ae4ca19c2d84a195412bfc472ee)
|
||||
* Review the documentation for the replication API [PR 756](https://github.com/pgjdbc/pgjdbc/pull/756) [3e1eb34d](https://github.com/pgjdbc/pgjdbc/commit/3e1eb34d2500eae9fdf4938ebbced4cff886edef)
|
||||
* fix callproc escape documentation the specification [PR 785](https://github.com/pgjdbc/pgjdbc/pull/785) [95a3f41d](https://github.com/pgjdbc/pgjdbc/commit/95a3f41d6c0debbc6658312c484c6709e3da2225)
|
||||
* Honour setLogStream. If the logStream is set [PR 780](https://github.com/pgjdbc/pgjdbc/pull/780) [b97ad630](https://github.com/pgjdbc/pgjdbc/commit/b97ad63089a9042cfef0ce97d1eaacce0fe47d4e)
|
||||
|
||||
Jacques Fuentes (1):
|
||||
|
||||
* Make replication docs use PREFER\_QUERY\_MODE [PR 761](https://github.com/pgjdbc/pgjdbc/pull/761) [bd0497de](https://github.com/pgjdbc/pgjdbc/commit/bd0497dee741e92de1cc3eeabb58a82608ed6070)
|
||||
|
||||
James (1):
|
||||
|
||||
* fix: use SQLWarning(String reason) constructor for correct DriverManager [PR 751](https://github.com/pgjdbc/pgjdbc/pull/751) [74a426b9](https://github.com/pgjdbc/pgjdbc/commit/74a426b929f47a3f585dd6e535300d2ffe77a9da)
|
||||
|
||||
Joe Kutner (1):
|
||||
|
||||
* fix: Only resolve hostname if not using a SOCKS proxy [PR 774](https://github.com/pgjdbc/pgjdbc/pull/774) [480b0cf1](https://github.com/pgjdbc/pgjdbc/commit/480b0cf1ffe266e41e259f1f7a016d3ea681cc3a)
|
||||
|
||||
Jorge Solorzano (3):
|
||||
|
||||
* fix: build site with jekyll 2.2.0 [PR 755](https://github.com/pgjdbc/pgjdbc/pull/755) [773ee679](https://github.com/pgjdbc/pgjdbc/commit/773ee679ae61ae48fed56c915bf4e19576cbb292)
|
||||
* test: check that new properties follow correct lower camel case [PR 740](https://github.com/pgjdbc/pgjdbc/pull/740) [3f2a02e1](https://github.com/pgjdbc/pgjdbc/commit/3f2a02e128367df6ae47b6f850203200cef223fe)
|
||||
* refactor: simplify Encoding class [PR 765](https://github.com/pgjdbc/pgjdbc/pull/765) [ef8c6f96](https://github.com/pgjdbc/pgjdbc/commit/ef8c6f9651f54a220f7231a2bc5b8ad0ca08d0c7)
|
||||
|
||||
Philippe Marschall (1):
|
||||
|
||||
* feat: support fetching a REF_CURSOR using getObject [PR 809](https://github.com/pgjdbc/pgjdbc/pull/809) [4ab5ccb7](https://github.com/pgjdbc/pgjdbc/commit/4ab5ccb7a299cfcec8a5b1cddf612d3f828fa157)
|
||||
|
||||
Robert Zenz (1):
|
||||
|
||||
* fix: function calls without parameters do not require parentheses [2958cc22](https://github.com/pgjdbc/pgjdbc/commit/2958cc22a6a00609bfbb6eb17d4e401dfe433123)
|
||||
|
||||
Vladimir Gordiychuk (2):
|
||||
|
||||
* chore: fix false alarm on check coredump [PR 806](https://github.com/pgjdbc/pgjdbc/pull/806) [3883a846](https://github.com/pgjdbc/pgjdbc/commit/3883a846febfe92582be2785737da9460ece1176)
|
||||
* bug: fix calculation of lastReceiveLSN for logical replication [PR 801](https://github.com/pgjdbc/pgjdbc/pull/801) [170d9c27](https://github.com/pgjdbc/pgjdbc/commit/170d9c27810349456e56aff1c36a0ad6584b9e28)
|
||||
|
||||
Vladimir Sitnikov (3):
|
||||
|
||||
* fix: make sure org.postgresql.Driver is loaded when accessing though DataSource interface [PR 768](https://github.com/pgjdbc/pgjdbc/pull/768) [9c80adc2](https://github.com/pgjdbc/pgjdbc/commit/9c80adc24776ae02e0aff419e1cddf26a28eeff0)
|
||||
* refactor: add encoding, fix expected/actual, use proper constructor [77cace40](https://github.com/pgjdbc/pgjdbc/commit/77cace40a4ce33fadafcb5f144b5238bff2854a3)
|
||||
* fix: infinity handling for java.time types [PR 789](https://github.com/pgjdbc/pgjdbc/pull/789) [f375701b](https://github.com/pgjdbc/pgjdbc/commit/f375701b571c308b7e389df49c1d958f416e4340)
|
||||
|
||||
slmsbrhgn (1):
|
||||
|
||||
* bug: fix data being truncated in setCharacterStream (the bug introduced in 42.0.0) [PR 802](https://github.com/pgjdbc/pgjdbc/pull/802) [28c98418](https://github.com/pgjdbc/pgjdbc/commit/28c98418b576394b7a0a4a6415ae86ba47be40ae)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Alexander Kjäll](https://github.com/alexanderkjall)
|
||||
[Daniel Migowski](https://github.com/dmigowski)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Jacques Fuentes](https://github.com/jpfuentes2)
|
||||
[James](https://github.com/jamesthomp)
|
||||
[Joe Kutner](https://github.com/jkutner)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Philippe Marschall](https://github.com/marschall)
|
||||
[Robert Zenz](https://github.com/RobertZenz)
|
||||
[Vladimir Gordiychuk](https://github.com/Gordiychuk)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
||||
[slmsbrhgn](https://github.com/slmsbrhgn)
|
27
docs/_posts/2017-05-05-42.1.1-release.md
Normal file
27
docs/_posts/2017-05-05-42.1.1-release.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "PostgreSQL JDBC Driver 42.1.1 Released"
|
||||
date: 2017-05-05 00:00:00 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.1.1
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Fixed
|
||||
- Fix infinite dates that might be corrupted when transferred in binary for certain JREs. For instance, 5881610-07-11 instead of infinity. [1e5bf563](https://github.com/pgjdbc/pgjdbc/commit/1e5bf563f41203417281117ed20b183cd295b4e0)
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Vladimir Sitnikov (2):
|
||||
|
||||
* fix: infinite dates might be corrupted when transferred in binary for certain JREs [1e5bf563](https://github.com/pgjdbc/pgjdbc/commit/1e5bf563f41203417281117ed20b183cd295b4e0)
|
||||
* chore: print "include notable changes" to the generated changelog [6bc4fe07](https://github.com/pgjdbc/pgjdbc/commit/6bc4fe0758510243d1f3cb56b0b1ae374117f7e4)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
73
docs/_posts/2017-07-12-42.1.2-release.md
Normal file
73
docs/_posts/2017-07-12-42.1.2-release.md
Normal file
@ -0,0 +1,73 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.1.2 Released
|
||||
date: 2017-07-12 18:11:06 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.1.2
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Changed
|
||||
- Better logic for *returning* keyword detection. Previously, pgjdbc could be defeated by column names that contain *returning*, so pgjdbc failed to "return generated keys" as it considered statement as already having *returning* keyword [PR 824](https://github.com/pgjdbc/pgjdbc/pull/824) [201daf1d](https://github.com/pgjdbc/pgjdbc/commit/201daf1dc916bbc35e2bbec961aebfd1b1e30bfc)
|
||||
- Use server-prepared statements for batch inserts when prepareThreshold>0. Note: this enables batch to use server-prepared from the first *executeBatch()* execution (previously it waited for *prepareThreshold* *executeBatch()* calls) [abc3d9d7](https://github.com/pgjdbc/pgjdbc/commit/abc3d9d7f34a001322fbbe53f25d5e77a33a667f)
|
||||
|
||||
### Fixed
|
||||
- Replication API: fix issue in #834 setting statusIntervalUpdate causes high CPU load. [PR 835](https://github.com/pgjdbc/pgjdbc/pull/835) [59236b74](https://github.com/pgjdbc/pgjdbc/commit/59236b74acdd400d9d91d3eb2bb07d70b15392e5)
|
||||
|
||||
### Regressions
|
||||
- NPE in PreparedStatement.executeBatch in case of empty batch. Fixed in 42.1.3
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlexElin (1):
|
||||
|
||||
* refactor: make PSQLState as enum [PR 837](https://github.com/pgjdbc/pgjdbc/pull/837) [fb5df7fe](https://github.com/pgjdbc/pgjdbc/commit/fb5df7fee1d3568356e680c6ac5a62336ec7bf6e)
|
||||
|
||||
Dave Cramer (8):
|
||||
|
||||
* Initial support of partitioned tables via JDBC metadata API [PR 823](https://github.com/pgjdbc/pgjdbc/pull/823) [9c3471f2](https://github.com/pgjdbc/pgjdbc/commit/9c3471f21f6ac9cf1a5e5700115ac7d0d55e0ad9)
|
||||
* fix javadoc complaints and some small edits to replication comments [PR 832](https://github.com/pgjdbc/pgjdbc/pull/832) [2d0bfceb](https://github.com/pgjdbc/pgjdbc/commit/2d0bfcebb0641ddb73d9297e6211f75537238b15)
|
||||
* fix issue #834 setting statusIntervalUpdate causes high CPU load \ [PR 835](https://github.com/pgjdbc/pgjdbc/pull/835) [59236b74](https://github.com/pgjdbc/pgjdbc/commit/59236b74acdd400d9d91d3eb2bb07d70b15392e5)
|
||||
* fix issue #838 make sure we don't get columns that are dropped [PR 840](https://github.com/pgjdbc/pgjdbc/pull/840) [464a2d43](https://github.com/pgjdbc/pgjdbc/commit/464a2d43519004174f1b530a595ee0ad9ffda870)
|
||||
* add missing connection documentation, fix spelling [PR 846](https://github.com/pgjdbc/pgjdbc/pull/846) [cd400f6f](https://github.com/pgjdbc/pgjdbc/commit/cd400f6f39d3c062fc94fa97b33b4d272a829a24)
|
||||
* more spelling mistakes for preferQueryMode [PR 850](https://github.com/pgjdbc/pgjdbc/pull/850) [73bc3c1b](https://github.com/pgjdbc/pgjdbc/commit/73bc3c1b7acda676f366631ff7e28f09a3399f37)
|
||||
* fix formatting of section on failover, still not perfect but better [PR 852](https://github.com/pgjdbc/pgjdbc/pull/852) [9f722014](https://github.com/pgjdbc/pgjdbc/commit/9f72201458d1ce0837e9525d947dcea2828b9475)
|
||||
* small reformat to clarify read and write connections [PR 854](https://github.com/pgjdbc/pgjdbc/pull/854) [551d71b6](https://github.com/pgjdbc/pgjdbc/commit/551d71b6a513c223d8d8d8d75afbe8b5d42ce783)
|
||||
|
||||
Jorge Solorzano (3):
|
||||
|
||||
* test: yet another rename to use "lsn" not "location" in Pg10. [PR 822](https://github.com/pgjdbc/pgjdbc/pull/822) [90228621](https://github.com/pgjdbc/pgjdbc/commit/902286212df19b1eda9310c4174756786ad249c7)
|
||||
* use zulu-9 [PR 828](https://github.com/pgjdbc/pgjdbc/pull/828) [4ac74886](https://github.com/pgjdbc/pgjdbc/commit/4ac74886e54e7689035be00c417a536717a45318)
|
||||
* fix: remove type name from cast exception of getBoolean and setObject [PR 781](https://github.com/pgjdbc/pgjdbc/pull/781) [394b3a2f](https://github.com/pgjdbc/pgjdbc/commit/394b3a2f4d93e9ca701d8c31b4b66fa25fca8945)
|
||||
|
||||
Robert 'Bobby' Zenz (1):
|
||||
|
||||
* fix: Add fallback to setObject(int, Object) for Number [PR 812](https://github.com/pgjdbc/pgjdbc/pull/812) [5b9edb7d](https://github.com/pgjdbc/pgjdbc/commit/5b9edb7dfb1b281bffedf7c9f2583f2df354c0ea)
|
||||
|
||||
Vladimir Gordiychuk (1):
|
||||
|
||||
* bug: floating logical replcation test [PR 829](https://github.com/pgjdbc/pgjdbc/pull/829) [2d3e8972](https://github.com/pgjdbc/pgjdbc/commit/2d3e8972a0b34106a8b7426619cabf852c38ddaa)
|
||||
|
||||
Vladimir Sitnikov (7):
|
||||
|
||||
* chore: implement a script to stage pgjdbc, pgdjbc-jre7, pgjdbc-jre6 artifacts [15d78839](https://github.com/pgjdbc/pgjdbc/commit/15d7883987d2de4b662aa8cd81c6de5be0257153)
|
||||
* doc: fix 42.1.0.jre8->jre6 typo [PR 42](https://github.com/pgjdbc/pgjdbc/pull/42) [88942b58](https://github.com/pgjdbc/pgjdbc/commit/88942b58637afbea16102a6a77d922914fd27562)
|
||||
* fix: use server-prepared statements for batch inserts when prepareThreshold>0 [abc3d9d7](https://github.com/pgjdbc/pgjdbc/commit/abc3d9d7f34a001322fbbe53f25d5e77a33a667f)
|
||||
* fix: better parsing for returning keyword [PR 824](https://github.com/pgjdbc/pgjdbc/pull/824) [201daf1d](https://github.com/pgjdbc/pgjdbc/commit/201daf1dc916bbc35e2bbec961aebfd1b1e30bfc)
|
||||
* docs: build index, changelog pages from _posts/... to reduce release overhead [d6fe07d7](https://github.com/pgjdbc/pgjdbc/commit/d6fe07d7bb613d7b8fb06ace64b9b37d3f23bbfe)
|
||||
* chore: make ./release\_notes.sh create docs/\_posts/$DATE\_YMD-$VERS-release.md file [e00d4571](https://github.com/pgjdbc/pgjdbc/commit/e00d4571bb6ca24c8f93956b59fd1c9a14131394)
|
||||
* docs: add 42.1.2 release notes [6f127a61](https://github.com/pgjdbc/pgjdbc/commit/6f127a61eed5317133ea80f0a06f9441b170a17a)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Robert 'Bobby' Zenz](https://github.com/RobertZenz)
|
||||
[Vladimir Gordiychuk](https://github.com/Gordiychuk)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
27
docs/_posts/2017-07-14-42.1.3-release.md
Normal file
27
docs/_posts/2017-07-14-42.1.3-release.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.1.3 Released
|
||||
date: 2017-07-14 10:49:13 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.1.3
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Fixed
|
||||
- Fix NPE in PreparedStatement.executeBatch in case of empty batch (regression since 42.1.2). [PR 867](https://github.com/pgjdbc/pgjdbc/pull/867)
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Vladimir Sitnikov (2):
|
||||
|
||||
* doc: ensure changelog uses %Y-%m-%d format, not %Y-%d-%m [5d585aac](https://github.com/pgjdbc/pgjdbc/commit/5d585aac7e4f916d4b54dccd11c778143a1f7725)
|
||||
* fix: NPE in PreparedStatement.executeBatch in case of empty batch [PR 867](https://github.com/pgjdbc/pgjdbc/pull/867) [7514552d](https://github.com/pgjdbc/pgjdbc/commit/7514552d2d105cb8e637e70c8e14ab7e36000ed4)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
54
docs/_posts/2017-08-01-42.1.4-release.md
Normal file
54
docs/_posts/2017-08-01-42.1.4-release.md
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.1.4 Released
|
||||
date: 2017-08-01 20:00:00 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.1.4
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Changed
|
||||
- Statements with non-zero fetchSize no longer require server-side named handle. This might cause issues when using old PostgreSQL versions (pre-8.4)+fetchSize+interleaved ResultSet processing combo. [Issue 869](https://github.com/pgjdbc/pgjdbc/issues/869)
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlexElin (4):
|
||||
|
||||
* test: migrate tests to JUnit 4 [PR 738](https://github.com/pgjdbc/pgjdbc/pull/738) [5b65e2f4](https://github.com/pgjdbc/pgjdbc/commit/5b65e2f45b1cb130b4380b31ff6c0c73210d9fe0)
|
||||
* style: update checkstyle + turn on some rules [PR 847](https://github.com/pgjdbc/pgjdbc/pull/847) [246b759c](https://github.com/pgjdbc/pgjdbc/commit/246b759cdc264c2732717dbd6ff9f8f472024196)
|
||||
* test: migrate tests to Junit4 [PR 883](https://github.com/pgjdbc/pgjdbc/pull/883) [5c12da16](https://github.com/pgjdbc/pgjdbc/commit/5c12da16d3aa17d299e942c4a2b3647674422920)
|
||||
* refactor: remove useless checks in the tests [0221f930](https://github.com/pgjdbc/pgjdbc/commit/0221f930b35a6f24e539ac4740886fafaebcaeac)
|
||||
|
||||
Dave Cramer (2):
|
||||
|
||||
* honour PGPORT, PGHOST, PGDBNAME in connection properties [PR 862](https://github.com/pgjdbc/pgjdbc/pull/862) [2951a958](https://github.com/pgjdbc/pgjdbc/commit/2951a9583b8ea1b1b0e933896ff4be95628f834e)
|
||||
* doc: fix spelling mistakes [PR 868](https://github.com/pgjdbc/pgjdbc/pull/868) [757db625](https://github.com/pgjdbc/pgjdbc/commit/757db62590f4f7b72cf565680ab79eda7880f2b3)
|
||||
|
||||
Michael Glaesemann (4):
|
||||
|
||||
* test: assume minimum server version 8.3 testing autosave with ALTER [77ee528d](https://github.com/pgjdbc/pgjdbc/commit/77ee528d021ccdf740b19f9ed48259ece5df7705)
|
||||
* test: assume minimum server version 8.3 when testing with uuid [ff2717e4](https://github.com/pgjdbc/pgjdbc/commit/ff2717e42a8c0394e6cde4527ed1f721ffa9fb84)
|
||||
* refactor: remove unused import [8afe856e](https://github.com/pgjdbc/pgjdbc/commit/8afe856e5ea22870cf1489ec1fd328efee6b7426)
|
||||
* test: assume integer datetimes for timestamp tests [PR 873](https://github.com/pgjdbc/pgjdbc/pull/873) [8287e7f9](https://github.com/pgjdbc/pgjdbc/commit/8287e7f92f890a41f8d2b51980157a92e1cd57e8)
|
||||
|
||||
Vladimir Sitnikov (7):
|
||||
|
||||
* docs: prevent "<!--more-->" from being displayed on the changelog page [e1747693](https://github.com/pgjdbc/pgjdbc/commit/e174769363d12941b8e95d90d0459751351ea4e1)
|
||||
* doc: fix anchors for "contributors to this release" [c1d743f2](https://github.com/pgjdbc/pgjdbc/commit/c1d743f2408df8b377bc9d8440717541a5b627e3)
|
||||
* test: fix StringTypeParameterTest to skip preferQueryMode=simple [beca1692](https://github.com/pgjdbc/pgjdbc/commit/beca16922b455a6a00c655df8a3b701d008aad6e)
|
||||
* chore: install PostgreSQL 9.1 to Trusty builds via apt, and use Precise for Java 6 [e960f237](https://github.com/pgjdbc/pgjdbc/commit/e960f2373a8de8b1b58fa199ee85a8b73ae684d2)
|
||||
* test: make StringTypeParameterTest 8.3+ since 8.2 misses enum types [PR 882](https://github.com/pgjdbc/pgjdbc/pull/882) [ed0014cc](https://github.com/pgjdbc/pgjdbc/commit/ed0014cc03cedde76003a84c06a4f7b95b823de0)
|
||||
* fix: named statements were used when fetchSize was non-zero and prepareThreshold=0 [PR 870](https://github.com/pgjdbc/pgjdbc/pull/870) [f0deabf7](https://github.com/pgjdbc/pgjdbc/commit/f0deabf7d87bb5bffeb84e9cd686eeb632aa9687)
|
||||
* test: skip ConcurrentStatementFetch for PostgreSQL < 8.4 [PR 884](https://github.com/pgjdbc/pgjdbc/pull/884) [5334cb6e](https://github.com/pgjdbc/pgjdbc/commit/5334cb6ef7554bba255f00baf4ff3220f16e31ea)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Michael Glaesemann](https://github.com/grzm)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
254
docs/_posts/2018-01-17-42.2.0-release.md
Normal file
254
docs/_posts/2018-01-17-42.2.0-release.md
Normal file
@ -0,0 +1,254 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.0 Released
|
||||
date: 2018-01-17 20:11:10 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.0
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Known issues
|
||||
- SCRAM authentication does not work as scram client classes are not packaged
|
||||
- client_encoding has to be UTF8 even with allowEncodingChanges=true
|
||||
|
||||
### Added
|
||||
- Support SCRAM-SHA-256 for PostgreSQL 10 in the JDBC 4.2 version (Java 8+) using the Ongres SCRAM library. [PR 842](https://github.com/pgjdbc/pgjdbc/pull/842)
|
||||
- Make SELECT INTO and CREATE TABLE AS return row counts to the client in their command tags. [Issue 958](https://github.com/pgjdbc/pgjdbc/issues/958) [PR 962](https://github.com/pgjdbc/pgjdbc/pull/962)
|
||||
- Support Subject Alternative Names for SSL connections. [PR 952](https://github.com/pgjdbc/pgjdbc/pull/952)
|
||||
- Support isAutoIncrement metadata for PostgreSQL 10 IDENTITY column. [PR 1004](https://github.com/pgjdbc/pgjdbc/pull/1004)
|
||||
- Support for primitive arrays [PR 887](https://github.com/pgjdbc/pgjdbc/pull/887) [3e0491a](https://github.com/pgjdbc/pgjdbc/commit/3e0491ac3833800721b98e7437635cf6ab338162)
|
||||
- Implement support for get/setNetworkTimeout() in connections. [PR 849](https://github.com/pgjdbc/pgjdbc/pull/849)
|
||||
- Make GSS JAAS login optional, add an option "jaasLogin" [PR 922](https://github.com/pgjdbc/pgjdbc/pull/922) see [Connecting to the Database](https://jdbc.postgresql.org/documentation/head/connect.html)
|
||||
|
||||
### Changed
|
||||
- Improve behaviour of ResultSet.getObject(int, Class). [PR 932](https://github.com/pgjdbc/pgjdbc/pull/932)
|
||||
- Parse CommandComplete message using a regular expresion, allows complete catch of server returned commands for INSERT, UPDATE, DELETE, SELECT, FETCH, MOVE, COPY and future commands. [PR 962](https://github.com/pgjdbc/pgjdbc/pull/962)
|
||||
- Use 'time with timezone' and 'timestamp with timezone' as is and ignore the user provided Calendars, 'time' and 'timestamp' work as earlier except "00:00:00" now maps to 1970-01-01 and "24:00:00" uses the system provided Calendar ignoring the user-provided one [PR 1053](https://github.com/pgjdbc/pgjdbc/pull/1053)
|
||||
- Change behaviour of multihost connection. The new behaviour is to try all secondaries first before trying the master [PR 844](https://github.com/pgjdbc/pgjdbc/pull/844).
|
||||
- Avoid reflective access to TimeZone.defaultTimeZone in Java 9+ [PR 1002](https://github.com/pgjdbc/pgjdbc/pull/1002) fixes [Issue 986](https://github.com/pgjdbc/pgjdbc/issues/986)
|
||||
|
||||
### Fixed
|
||||
- Make warnings available as soon as they are received from the server. This is useful for long running queries, where it can be beneficial to know about a warning before the query completes. [PR 857](https://github.com/pgjdbc/pgjdbc/pull/857)
|
||||
- Use 00:00:00 and 24:00:00 for LocalTime.MIN/MAX. [PR 992](https://github.com/pgjdbc/pgjdbc/pull/992)
|
||||
- Now the DatabaseMetaData.getFunctions() implementation complies with the JDBC docs. [PR 918](https://github.com/pgjdbc/pgjdbc/pull/918)
|
||||
- Execute autosave/rollback savepoint via simple queries always to prevent "statement S_xx not exists" when autosaving fixes [Issue #955](https://github.com/pgjdbc/pgjdbc/issues/955)
|
||||
- Received resultset tuples, but no field structure for them" when bind failure happens on 5th execution of a statement [Issue 811](https://github.com/pgjdbc/pgjdbc/issues/811)
|
||||
|
||||
### Removed
|
||||
- Drop support for the (insecure) crypt authentication method. [PR 1026](https://github.com/pgjdbc/pgjdbc/pull/1026)
|
||||
|
||||
### Deprecated
|
||||
- Reintroduce Driver.getVersion for backward compatibility reasons, mark it as deprecated as application should not rely on it (regression since 42.0.0) [50d5dd3e](https://github.com/pgjdbc/pgjdbc/commit/50d5dd3e708a92602e04d6b4aa0822ad3f110a78)
|
||||
- slave and preferSlave values for the targetServerType connection property have been deprecated in favour of secondary and preferSecondary respectively.
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlexElin (9):
|
||||
|
||||
* docs: fix header in CONTRIBUTING [PR 902](https://github.com/pgjdbc/pgjdbc/pull/902) [38ff0fe](https://github.com/pgjdbc/pgjdbc/commit/38ff0fe4728addf9a34d6fb0069ce4963aaae7ee)
|
||||
* refactor: remove dead code from PGStream, implement Closeable [PR 901](https://github.com/pgjdbc/pgjdbc/pull/901) [acff949](https://github.com/pgjdbc/pgjdbc/commit/acff9495b8745bce30d93d61e77caf81d9748b4b)
|
||||
* refactor: replace some usages of assertTrue [PR 957](https://github.com/pgjdbc/pgjdbc/pull/957) [c759a58](https://github.com/pgjdbc/pgjdbc/commit/c759a58313c4344924a311021e1c860580f3e318)
|
||||
* refactor: state of PGXAConnection as enum [PR 966](https://github.com/pgjdbc/pgjdbc/pull/966) [7618822](https://github.com/pgjdbc/pgjdbc/commit/76188228ddb412db74959fbe59b5c2d6ef5eddfc)
|
||||
* refactor: make PgStream implements Flushable [PR 1008](https://github.com/pgjdbc/pgjdbc/pull/1008) [0c3a2fc](https://github.com/pgjdbc/pgjdbc/commit/0c3a2fc132101f83dbb0990ac2c49c49b9c65ffe)
|
||||
* style: add MissingDeprecated into checkstyle [PR 1019](https://github.com/pgjdbc/pgjdbc/pull/1019) [d74386d](https://github.com/pgjdbc/pgjdbc/commit/d74386def0d39f450f5dcfdb21ff6171ba0a89f3)
|
||||
* chore: update checkstyle [PR 1025](https://github.com/pgjdbc/pgjdbc/pull/1025) [69e3b8b](https://github.com/pgjdbc/pgjdbc/commit/69e3b8b2ef7fb80ece8df23b55855fa4208e8a00)
|
||||
* refactor: simplify methods in ConnectionFactoryImpl [PR 1028](https://github.com/pgjdbc/pgjdbc/pull/1028) [ed27c5b](https://github.com/pgjdbc/pgjdbc/commit/ed27c5b464563448079189b1759ecf05d4726ea0)
|
||||
* refactor: replace some usages of initCause [PR 1037](https://github.com/pgjdbc/pgjdbc/pull/1037) [0c29823](https://github.com/pgjdbc/pgjdbc/commit/0c29823ad8eca86e3b8f27bcee5f116d41e367f9)
|
||||
|
||||
Álvaro Hernández Tortosa (1):
|
||||
|
||||
* Add SCRAM-SHA-256 support [PR 842](https://github.com/pgjdbc/pgjdbc/pull/842) [befea18](https://github.com/pgjdbc/pgjdbc/commit/befea18d153dda7814daef4e036d3f5daf8de1e5)
|
||||
|
||||
Barnabas Bodnar (1):
|
||||
|
||||
* fix: don't attempt to read a SQLXML more than once [PR 965](https://github.com/pgjdbc/pgjdbc/pull/965) [8f5e245](https://github.com/pgjdbc/pgjdbc/commit/8f5e2454185a929f1bc6ef66813d6681bb38e736)
|
||||
|
||||
Brett Okken (1):
|
||||
|
||||
* feat: primitive arrays [PR 887](https://github.com/pgjdbc/pgjdbc/pull/887) [3e0491a](https://github.com/pgjdbc/pgjdbc/commit/3e0491ac3833800721b98e7437635cf6ab338162)
|
||||
|
||||
Brett Wooldridge (1):
|
||||
|
||||
* Fixes #638 Implement support for get/setNetworkTimeout() [PR 849](https://github.com/pgjdbc/pgjdbc/pull/849) [8a30044](https://github.com/pgjdbc/pgjdbc/commit/8a30044d9e97c1038ee4401ae745d37a11f008db)
|
||||
|
||||
Chen Huajun (1):
|
||||
|
||||
* fix: improve multihost connection for preferSlave case (verify expired hosts before connecting to cached master) [PR 844](https://github.com/pgjdbc/pgjdbc/pull/844) [c6fec34](https://github.com/pgjdbc/pgjdbc/commit/c6fec34661b51cd9cbee157d0c334a3ab29859e8)
|
||||
|
||||
Dave Cramer (11):
|
||||
|
||||
* Update thread safety status of the driver to reflect reality; that being that the driver is not thread safe [PR 928](https://github.com/pgjdbc/pgjdbc/pull/928) [ad47aba](https://github.com/pgjdbc/pgjdbc/commit/ad47abafa1754f8d0f2126ef1d26aa9b037b49e5)
|
||||
* fix: use 00:00:00 and 24:00:00 for LocalTime.MIN/MAX [PR 992](https://github.com/pgjdbc/pgjdbc/pull/992) [f2d8ec5](https://github.com/pgjdbc/pgjdbc/commit/f2d8ec5740aa26c417d666a7afedaaf0fdf62d37)
|
||||
* fix: support Subject Alternative Names for SSL connections [PR 952](https://github.com/pgjdbc/pgjdbc/pull/952) [2dcb91e](https://github.com/pgjdbc/pgjdbc/commit/2dcb91ef1fd8f0fe08f107c9c30cdc57d4c44b05)
|
||||
* test: Appveyor configuration [PR 1000](https://github.com/pgjdbc/pgjdbc/pull/1000) [059628f](https://github.com/pgjdbc/pgjdbc/commit/059628fcdf2058cfd05cb80eac64799ca26ad0d2)
|
||||
* add test for identity, fix isAutoincrement in postgresql 10 fixes #130 [PR 1004](https://github.com/pgjdbc/pgjdbc/pull/1004) [2f6633b](https://github.com/pgjdbc/pgjdbc/commit/2f6633bd9e1e9d7f313ea4dfec37f9671fc07453)
|
||||
* elaborate on sslmode options [PR 1054](https://github.com/pgjdbc/pgjdbc/pull/1054) [aa7a420](https://github.com/pgjdbc/pgjdbc/commit/aa7a4202e41bc58c4958e06161c5fd4daa36a7f9)
|
||||
* prefer the word secondary over slave [PR 1063](https://github.com/pgjdbc/pgjdbc/pull/1063) [2e8c2b6](https://github.com/pgjdbc/pgjdbc/commit/2e8c2b67e22ddaa38894be4b2578ccd4bf97a27d)
|
||||
* Revert "refactor: replace some usages of initCause [PR 1037](https://github.com/pgjdbc/pgjdbc/pull/1037)" (#1064) [e6a1ecc](https://github.com/pgjdbc/pgjdbc/commit/e6a1eccb148c3c59e8cf122e98ad01afc5bb555a)
|
||||
* prefer secondary over slave referring to standby or secondary servers [PR 1070](https://github.com/pgjdbc/pgjdbc/pull/1070) [32c53902](https://github.com/pgjdbc/pgjdbc/commit/32c539020db3c940bae9b2a42425b1f23e864c73)
|
||||
* first pass at release notes and some fixes to previous notes [PR 1041](https://github.com/pgjdbc/pgjdbc/pull/1041) [a8260f5](https://github.com/pgjdbc/pgjdbc/commit/a8260f5d0e31d00c1b44d2b94f62d86a72e2b2d5)
|
||||
* Update 2018-01-16-42.2.0-release.md [b36867f](https://github.com/pgjdbc/pgjdbc/commit/b36867f34719d2af559b60b6f63b2df036798231)
|
||||
|
||||
Hugh Cole-Baker (1):
|
||||
|
||||
* Make GSS JAAS login optional [PR 922](https://github.com/pgjdbc/pgjdbc/pull/922) [d7f0f27](https://github.com/pgjdbc/pgjdbc/commit/d7f0f271b73adbf0ae22146beea122e014d9f9f2)
|
||||
|
||||
Jeff Klukas (1):
|
||||
|
||||
* fix: advance lastReceiveLSN on keepalive messages [PR 1038](https://github.com/pgjdbc/pgjdbc/pull/1038) [1be8a9e](https://github.com/pgjdbc/pgjdbc/commit/1be8a9ebafbfbcff118385a61a350745addcaf3d)
|
||||
|
||||
Joe Kutner (1):
|
||||
|
||||
* fix: Added support for socksNonProxyHosts property [PR 975](https://github.com/pgjdbc/pgjdbc/pull/975) (#985) [9813c68](https://github.com/pgjdbc/pgjdbc/commit/9813c685cae2cbfbc561a6220ba388cef08f34b0)
|
||||
|
||||
Jorge Solorzano (13):
|
||||
|
||||
* chore: use mainly Trusty in Travis, reorder CI jobs, and jdk tests [PR 939](https://github.com/pgjdbc/pgjdbc/pull/939) [646a868](https://github.com/pgjdbc/pgjdbc/commit/646a868c0bc80def5fa62374e83b71d65fef9a14)
|
||||
* fix: ignore replication test until 11.1 to avoid random failures [PR 949](https://github.com/pgjdbc/pgjdbc/pull/949) [ee6443d](https://github.com/pgjdbc/pgjdbc/commit/ee6443db167da735f5a9402d16f31c3ee6d719dc)
|
||||
* chore: streamlining jobs [PR 959](https://github.com/pgjdbc/pgjdbc/pull/959) [ed0a398](https://github.com/pgjdbc/pgjdbc/commit/ed0a398edb47d0eea62e7f53723e14d9ed278fbb)
|
||||
* docs: move changelog to separate file [PR 956](https://github.com/pgjdbc/pgjdbc/pull/956) [e67e8f9](https://github.com/pgjdbc/pgjdbc/commit/e67e8f9685e6c8235134baedeb790f39de39e77c)
|
||||
* docs: improve website front page [PR 968](https://github.com/pgjdbc/pgjdbc/pull/968) [65170f1](https://github.com/pgjdbc/pgjdbc/commit/65170f1690bb571c8dbe0425b205ba8498c8173f)
|
||||
* docs: fix test db password in docs [PR 984](https://github.com/pgjdbc/pgjdbc/pull/984) [7df56f8](https://github.com/pgjdbc/pgjdbc/commit/7df56f816770a7129cb56d150c6d556c64632a5c)
|
||||
* test: add openj9 to the matrix [PR 974](https://github.com/pgjdbc/pgjdbc/pull/974) [f187645](https://github.com/pgjdbc/pgjdbc/commit/f187645896e9f86a654390581163a7064b611404)
|
||||
* chore: remove testing of the latest Java updates [PR 993](https://github.com/pgjdbc/pgjdbc/pull/993) [0d8fde6](https://github.com/pgjdbc/pgjdbc/commit/0d8fde6da6dd28a14e12715a3b01d3787cac7fb8)
|
||||
* chore: updates to CHANGELOG.md in release_notes.sh [PR 981](https://github.com/pgjdbc/pgjdbc/pull/981) [bdfc1db](https://github.com/pgjdbc/pgjdbc/commit/bdfc1dbb45315d659a49c1ef7a831ca2d6326be4)
|
||||
* test: querymode extendedCacheEverything [PR 1007](https://github.com/pgjdbc/pgjdbc/pull/1007) [f574285](https://github.com/pgjdbc/pgjdbc/commit/f5742853b6d79cc20f718339855904c1384c59cd)
|
||||
* fix: first composite query not calling getNativeSql() [PR 1020](https://github.com/pgjdbc/pgjdbc/pull/1020) [2cae5a1](https://github.com/pgjdbc/pgjdbc/commit/2cae5a199c2d08768ea9f784ee3f60cef244c4b0)
|
||||
* drop old and unused crypt auth [PR 1026](https://github.com/pgjdbc/pgjdbc/pull/1026) [405f14e](https://github.com/pgjdbc/pgjdbc/commit/405f14eefc9d7e01bfaa1b526f1a6a0bac50d3c4)
|
||||
* chore: collect coverage for Java 7 [PR 1030](https://github.com/pgjdbc/pgjdbc/pull/1030) [b629934](https://github.com/pgjdbc/pgjdbc/commit/b6299347e15ea2a40c80de9907ae3f137caa4401)
|
||||
|
||||
Magnus (1):
|
||||
|
||||
* fix: make warnings available as soon as they are received [PR 857](https://github.com/pgjdbc/pgjdbc/pull/857) [83dd5fe](https://github.com/pgjdbc/pgjdbc/commit/83dd5fea94928b349e05c1417e264797052f2bbe)
|
||||
|
||||
Magnus Hagander (1):
|
||||
|
||||
* Fix documentation spelling of sslpasswordcallback [PR 1021](https://github.com/pgjdbc/pgjdbc/pull/1021) [8ba5841](https://github.com/pgjdbc/pgjdbc/commit/8ba58418ae10f80530f67f0c8628161011c5a228)
|
||||
|
||||
MichaelZg (1):
|
||||
|
||||
* fix: trim trailing zeros in timestamp strings returned in binary mode [PR 896](https://github.com/pgjdbc/pgjdbc/pull/896) [d28deff](https://github.com/pgjdbc/pgjdbc/commit/d28deff57684349707d2b2a357048f59b0861bb1)
|
||||
|
||||
Michael Glaesemann (1):
|
||||
|
||||
* refactor: use TypeInfo getPGArrayType instead of munging type name [PR 913](https://github.com/pgjdbc/pgjdbc/pull/913) [634e157](https://github.com/pgjdbc/pgjdbc/commit/634e157e4cdbc2f78f1a90ac4d9f538f39caf4f9)
|
||||
|
||||
Pavel Raiskup (2):
|
||||
|
||||
* packaging: rpm_ci: add missing BuildRequires [4e0cdc1](https://github.com/pgjdbc/pgjdbc/commit/4e0cdc13ec659f21a318b05c3a67cac7c75c957e)
|
||||
* packaging: rpm_ci: don't shade scram jar into pgjdbc [1fd6c4f](https://github.com/pgjdbc/pgjdbc/commit/1fd6c4fe5ccc93ab7d08bf77bcd5344bc60dd334)
|
||||
|
||||
Philippe Marschall (2):
|
||||
|
||||
* feat: improve ResultSet#getObject(int, Class) [PR 932](https://github.com/pgjdbc/pgjdbc/pull/932) [fcb28c7](https://github.com/pgjdbc/pgjdbc/commit/fcb28c7c87a18ba6673b7fd3a48f3421410eb942)
|
||||
* test: add ubenchmark for UTF-8 decoding [PR 988](https://github.com/pgjdbc/pgjdbc/pull/988) [0d918c3](https://github.com/pgjdbc/pgjdbc/commit/0d918c3b21ba2a368da34bd30668908723dc4d36)
|
||||
|
||||
Piyush Sharma (1):
|
||||
|
||||
* doc: Added quotes to URL in '@see' tag over org.postgresql.sspi.NTDSAPI#DsMakeSpnW for syntactic correctness [PR 926](https://github.com/pgjdbc/pgjdbc/pull/926) [29f574a](https://github.com/pgjdbc/pgjdbc/commit/29f574a0116ab93eade3c80e2db20573390a6a31)
|
||||
|
||||
Sehrope Sarkuni (1):
|
||||
|
||||
* feat: parse command complete message via regex [PR 962](https://github.com/pgjdbc/pgjdbc/pull/962) [097db5e](https://github.com/pgjdbc/pgjdbc/commit/097db5e70ae8bf193c736b11603332feadb8d544)
|
||||
|
||||
Thach Hoang (2):
|
||||
|
||||
* Update ServerVersionTest to actually compare versions [PR 1015](https://github.com/pgjdbc/pgjdbc/pull/1015) [cccd6cd](https://github.com/pgjdbc/pgjdbc/commit/cccd6cde4672de30ac0bbac6621b63e81aae9474)
|
||||
* fix: always return Short[] for java.sql.Array.getArray() on smallint[] [PR 1017](https://github.com/pgjdbc/pgjdbc/pull/1017) [279fb43](https://github.com/pgjdbc/pgjdbc/commit/279fb435b392114c45266ecef901bfd59470842a)
|
||||
|
||||
Vladimir Sitnikov (23):
|
||||
|
||||
* fix: reintroduce Driver.getVersion for backward compatibility reasons [PR 905](https://github.com/pgjdbc/pgjdbc/pull/905) [50d5dd3](https://github.com/pgjdbc/pgjdbc/commit/50d5dd3e708a92602e04d6b4aa0822ad3f110a78)
|
||||
* style: make PGReplicationStream, LargeObject implement AutoCloseable for Java 7+ [PR 1016](https://github.com/pgjdbc/pgjdbc/pull/1016) [9f07c9a](https://github.com/pgjdbc/pgjdbc/commit/9f07c9ae2eb0c1ec18455e3a3d66460dd264c790)
|
||||
* fix: prevent statement hang in case close() called when query is in progress [PR 1022](https://github.com/pgjdbc/pgjdbc/pull/1022) [04c5dbb](https://github.com/pgjdbc/pgjdbc/commit/04c5dbb5058008a8ddad0194156af9819595c315)
|
||||
* fix: synchronize Statement#result field access to make #close() more thread-safe [4139248](https://github.com/pgjdbc/pgjdbc/commit/41392481d5f2c7f89d783a535ade2d3afb565654)
|
||||
* fix: avoid reflective access to TimeZone.defaultTimeZone in Java 9+ [PR 1002](https://github.com/pgjdbc/pgjdbc/pull/1002) [fd0eeee](https://github.com/pgjdbc/pgjdbc/commit/fd0eeee8f123b1355b523425a1e11fdd59b057a5)
|
||||
* fix: throw TOO\_MANY\_RESULTS (0100E) instead of "PgResultSet: tuples must be non-null" [0d31d46](https://github.com/pgjdbc/pgjdbc/commit/0d31d46adff4e9772db843195e1638531bc703e0)
|
||||
* fix: "Received resultset tuples, but no field structure for them" when bind failure happens on 5th execution of a statement [PR 811](https://github.com/pgjdbc/pgjdbc/pull/811) [082d009](https://github.com/pgjdbc/pgjdbc/commit/082d00941ad5f8abf44a0785a6f086c106b3c746)
|
||||
* tests: correct assertion to use proper column [63918eb](https://github.com/pgjdbc/pgjdbc/commit/63918eb9b1211e0115c8b55401e22c7a3f37e534)
|
||||
* fix: add type parameter so code is Java 6/7 compatible [1361c52](https://github.com/pgjdbc/pgjdbc/commit/1361c5208d6afc5d54e4df1053c48cdb31df9038)
|
||||
* chore: avoid non-blocking IO for stdout to workaround "stdout: write error" in Travis [12bb084](https://github.com/pgjdbc/pgjdbc/commit/12bb084035a13c4fb690df93837b37e85354ebc4)
|
||||
* test: run Travis tests with non-default time zone [a3982b4](https://github.com/pgjdbc/pgjdbc/commit/a3982b474dd92cd32c8fb1b7dafbd28c853c4177)
|
||||
* fix: execute autosave/rollback savepoint via simple queries always to prevent "statement S_xx not exists" when autosaving [PR 955](https://github.com/pgjdbc/pgjdbc/pull/955) [684a699](https://github.com/pgjdbc/pgjdbc/commit/684a69920e08017c74ab4194d1a77067f544a28b)
|
||||
* fix: use 'time with time zone' and 'timestamp with time zone' values as is and avoid computation with user-provided/default Calendars [e8c43f3](https://github.com/pgjdbc/pgjdbc/commit/e8c43f36ab2a6843f37d27e7417a5214f7142084)
|
||||
* test: refactor SetObject310Test to use proper assertion messages and use less statements (make it faster) [be06946](https://github.com/pgjdbc/pgjdbc/commit/be06946f8b908536f4d659aaf6fc660bed339f67)
|
||||
* refactor: factor out receiveParameterStatus so all the ParameterStatus messages are handled in the same way [a94cfea](https://github.com/pgjdbc/pgjdbc/commit/a94cfeace5d66b4fe8d8fa3b16986baebaec2a11)
|
||||
* fix: add Provide-Capability OSGi manifest [PR 1029](https://github.com/pgjdbc/pgjdbc/pull/1029) [236805b](https://github.com/pgjdbc/pgjdbc/commit/236805bcaf0dd1d9df3542c5865a15b24375a01c)
|
||||
* chore: update version to 42.2.0-SNAPSHOT to reflect the next release version [e27ee74](https://github.com/pgjdbc/pgjdbc/commit/e27ee740535a4034084d450cddefda2fbcb1b2af)
|
||||
* packaging: add missing maven-clean-plugin dependency [a2ed9b5](https://github.com/pgjdbc/pgjdbc/commit/a2ed9b50e304a3437f92b945217c19197226d53f)
|
||||
* chore: introduce release via Travis [acb9bdd](https://github.com/pgjdbc/pgjdbc/commit/acb9bddf36a8af6d1dd09857a6a05014c3e8849a)
|
||||
* chore: skip CI builds for tags; skip Fedora and extendedCacheEverything jobs when building pull requests [3ba3b63](https://github.com/pgjdbc/pgjdbc/commit/3ba3b6334761909183334a3be3af0aa8dc4798da)
|
||||
* fix: avoid NPE from getObject(..., Date.class) and getObject(..., Calendar.class) on null timestamps [PR 1071](https://github.com/pgjdbc/pgjdbc/pull/1071) [eb33c4c](https://github.com/pgjdbc/pgjdbc/commit/eb33c4c8e27d6df6ccd9c0a81eb119edeb069d55)
|
||||
* test: add "as" to test queries so they work with PostgreSQL 8.3 [71b3c11](https://github.com/pgjdbc/pgjdbc/commit/71b3c118f6a9e125c06e58faa50bf54b6a8f3400)
|
||||
* docs: make pgjdbc's javadocs to inherit base Java documentation [eb406dc](https://github.com/pgjdbc/pgjdbc/commit/eb406dcbee469a8724723f008f7dc5a515457cbe)
|
||||
|
||||
Zemian Deng (3):
|
||||
|
||||
* refactor: use PGProperty enum instead of text ref for targetServerType, hostRecheckSeconds, loadBalanceHosts [PR 912](https://github.com/pgjdbc/pgjdbc/pull/912) (#915) [b0cfc33](https://github.com/pgjdbc/pgjdbc/commit/b0cfc33483759ed3583b57cd845311d17670524f)
|
||||
* fix: correct javadoc on PGResultSetMetaData.getFormat [PR 917](https://github.com/pgjdbc/pgjdbc/pull/917) [cd77693](https://github.com/pgjdbc/pgjdbc/commit/cd77693ca22924479a39b8d925f276879023672a)
|
||||
* fix: Correct DatabaseMetaData.getFunctions() implementation [PR 918](https://github.com/pgjdbc/pgjdbc/pull/918) [8884202](https://github.com/pgjdbc/pgjdbc/commit/8884202b9e7785a1eaf67ddcd97f2ba689d0cf19)
|
||||
|
||||
bpd0018 (3):
|
||||
|
||||
* docs - change load.md to reflect current practice [PR 1058](https://github.com/pgjdbc/pgjdbc/pull/1058) [90535d9](https://github.com/pgjdbc/pgjdbc/commit/90535d9289141c398b2e62f2ee7571617c5aecc3)
|
||||
* docs: fix the URL regex [PR 1057](https://github.com/pgjdbc/pgjdbc/pull/1057) [6c5490f](https://github.com/pgjdbc/pgjdbc/commit/6c5490f90da434f37abd0be0f7bbdc38169ec33f)
|
||||
* docs: fix no parameter connect string example [PR 1056](https://github.com/pgjdbc/pgjdbc/pull/1056) [bb8a315](https://github.com/pgjdbc/pgjdbc/commit/bb8a31508f3caef7532b87b50c19e092af2ec5f0)
|
||||
|
||||
djydewang (1):
|
||||
|
||||
* style: disallowing user to use incomplete fully qualified Check names in config file [PR 961](https://github.com/pgjdbc/pgjdbc/pull/961) [3286c8c](https://github.com/pgjdbc/pgjdbc/commit/3286c8caa16efe59307b2713784c348e603ee67d)
|
||||
|
||||
eperez (1):
|
||||
|
||||
* Someone forgot to get the next column [PR 973](https://github.com/pgjdbc/pgjdbc/pull/973) [15aec6a](https://github.com/pgjdbc/pgjdbc/commit/15aec6a99c5615cdf0c0adaf5fc47b5419c617d4)
|
||||
|
||||
mjanczykowski (1):
|
||||
|
||||
* feat: add setURL method to BaseDataSource [PR 999](https://github.com/pgjdbc/pgjdbc/pull/999) [2277ffb](https://github.com/pgjdbc/pgjdbc/commit/2277ffb7b65d3cba9ef05be36408e2fdbef00ee7)
|
||||
|
||||
rnveach (1):
|
||||
|
||||
* style: remove deprecated maxLineLength from LeftCurlyCheck [PR 904](https://github.com/pgjdbc/pgjdbc/pull/904) [5f083d1](https://github.com/pgjdbc/pgjdbc/commit/5f083d118eea30e180500864d70f292b411c19af)
|
||||
|
||||
steinarb (1):
|
||||
* fix: add Provide-Capability org.osgi.service.jdbc.DataSourceFactory to OSGi manifest [Issue 1029](https://github.com/pgjdbc/pgjdbc/issues/1029)
|
||||
|
||||
zapov (1):
|
||||
|
||||
* fix: avoid integer overflow when sending large arguments [PR 946](https://github.com/pgjdbc/pgjdbc/pull/946) [266ed61](https://github.com/pgjdbc/pgjdbc/commit/266ed61b30e89c2840b7967a8af7ac8ab86407ff)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[Álvaro Hernández Tortosa](https://github.com/ahachete)
|
||||
[Barnabas Bodnar](https://github.com/bbodnar)
|
||||
[Brett Okken](https://github.com/bokken)
|
||||
[Brett Wooldridge](https://github.com/brettwooldridge)
|
||||
[Chen Huajun](https://github.com/ChenHuajun)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Hugh Cole-Baker](https://github.com/sigmaris)
|
||||
[Jeff Klukas](https://github.com/jklukas)
|
||||
[Joe Kutner](https://github.com/jkutner)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Magnus](https://github.com/magJ)
|
||||
[Magnus Hagander](https://github.com/mhagander)
|
||||
[MichaelZg](https://github.com/michaelzg)
|
||||
[Michael Glaesemann](https://github.com/grzm)
|
||||
[Pavel Raiskup](https://github.com/praiskup)
|
||||
[Philippe Marschall](https://github.com/marschall)
|
||||
[Piyush Sharma](https://github.com/ps-sp)
|
||||
[Sehrope Sarkuni](https://github.com/sehrope)
|
||||
[Thach Hoang](https://github.com/thachhoang)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
||||
[Zemian Deng](https://github.com/zemian)
|
||||
[bpd0018](https://github.com/bpd0018)
|
||||
[djydewang](https://github.com/djydewang)
|
||||
[eperez](https://github.com/eperez)
|
||||
[mjanczykowski](https://github.com/mjanczykowski)
|
||||
[rnveach](https://github.com/rnveach)
|
||||
[zapov](https://github.com/zapov)
|
79
docs/_posts/2018-01-25-42.2.1-release.md
Normal file
79
docs/_posts/2018-01-25-42.2.1-release.md
Normal file
@ -0,0 +1,79 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.1 Released
|
||||
date: 2018-01-25 19:30:35 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.1
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Known issues
|
||||
- client_encoding has to be UTF8 even with allowEncodingChanges=true
|
||||
|
||||
### Changed
|
||||
- socksProxyHost is ignored in case it contains empty string [PR 1079](https://github.com/pgjdbc/pgjdbc/pull/1079)
|
||||
|
||||
### Fixed
|
||||
- Avoid connection failure when `DateStyle` is set to `ISO` (~PgBouncer) [Issue 1080](https://github.com/pgjdbc/pgjdbc/issues/1080)
|
||||
- Package scram:client classes, so SCRAM works when using a shaded jar [PR 1091](https://github.com/pgjdbc/pgjdbc/pull/1091) [1a89290e](https://github.com/pgjdbc/pgjdbc/commit/1a89290e110d5863b35e0a2ccf79e4292c1056f8)
|
||||
- reWriteBatchedInserts=true causes syntax error with ON CONFLICT [Issue 1045](https://github.com/pgjdbc/pgjdbc/issues/1045) [PR 1082](https://github.com/pgjdbc/pgjdbc/pull/1082)
|
||||
- Avoid failure in getPGArrayType when stringType=unspecified [PR 1036](https://github.com/pgjdbc/pgjdbc/pull/1036)
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlexElin (1):
|
||||
|
||||
* test: check if url is not for PostgreSQL [PR 1077](https://github.com/pgjdbc/pgjdbc/pull/1077) [fe463bce](https://github.com/pgjdbc/pgjdbc/commit/fe463bceb3d6449443bd5e6abf2929516effccff)
|
||||
|
||||
Alexander Kjäll (1):
|
||||
|
||||
* feat: add support for fetching 'TIMESTAMP(6) WITHOUT TIME ZONE' as LocalDate to getObject() [PR 1083](https://github.com/pgjdbc/pgjdbc/pull/1083) [09af4b23](https://github.com/pgjdbc/pgjdbc/commit/09af4b23ad589e3691314e955c130a8755436e2d)
|
||||
|
||||
Dave Cramer (1):
|
||||
|
||||
* fix: package scram:client classes, so SCRAM works when using a shaded jar [PR 1091](https://github.com/pgjdbc/pgjdbc/pull/1091) [1a89290e](https://github.com/pgjdbc/pgjdbc/commit/1a89290e110d5863b35e0a2ccf79e4292c1056f8)
|
||||
|
||||
Ivan (2):
|
||||
|
||||
* chore: remove braces for LeftCurlyCheck checkstyle [PR 1075](https://github.com/pgjdbc/pgjdbc/pull/1075) [c2664b44](https://github.com/pgjdbc/pgjdbc/commit/c2664b444ffa1390d0dd5e4104d4200823d145ba)
|
||||
* chore: remove additional braces for LeftCurlyCheck checkstyle [PR 1076](https://github.com/pgjdbc/pgjdbc/pull/1076) [975aaf5a](https://github.com/pgjdbc/pgjdbc/commit/975aaf5ae489b3efeda3fd0241a4d39d260105cd)
|
||||
|
||||
JCzogalla (1):
|
||||
|
||||
* Fixes issue #1078 [PR 1079](https://github.com/pgjdbc/pgjdbc/pull/1079) [0d51370b](https://github.com/pgjdbc/pgjdbc/commit/0d51370b68cd26ccfa92b0bae4a66da1015cf9ee)
|
||||
|
||||
Jamie Pullar (1):
|
||||
|
||||
* fix: getPGArrayType fails in when stringType=unspecified [PR 1036](https://github.com/pgjdbc/pgjdbc/pull/1036) [d5f1cf7c](https://github.com/pgjdbc/pgjdbc/commit/d5f1cf7c35b05318947021d41e73b6953f623256)
|
||||
|
||||
Jorge Solorzano (1):
|
||||
|
||||
* Fix style changelog [PR 1089](https://github.com/pgjdbc/pgjdbc/pull/1089) [5ebd2090](https://github.com/pgjdbc/pgjdbc/commit/5ebd20900ebf7af5b55c56eac7f2fae6d40d9f5c)
|
||||
|
||||
Pavel Raiskup (1):
|
||||
|
||||
* packaging: update Fedora's CI [dcbf70bc](https://github.com/pgjdbc/pgjdbc/commit/dcbf70bc071fe9d602f7c87918982b01452da9ba)
|
||||
|
||||
Vladimir Sitnikov (3):
|
||||
|
||||
* docs: reflect 42.2.0 release in readme.md [6d02e958](https://github.com/pgjdbc/pgjdbc/commit/6d02e9587e47921e66d8d029e5056bab72f15565)
|
||||
* fix: avoid connection failure when DateStyle is set to ISO [PR 1081](https://github.com/pgjdbc/pgjdbc/pull/1081) [e442db1f](https://github.com/pgjdbc/pgjdbc/commit/e442db1f064c78372f8312d65faee30842a68aea)
|
||||
* fix: reWriteBatchedInserts=true causes syntax error with ON CONFLICT [PR 1082](https://github.com/pgjdbc/pgjdbc/pull/1082) [e133510e](https://github.com/pgjdbc/pgjdbc/commit/e133510e70114db128784911b6790b5690d77320)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[Alexander Kjäll](https://github.com/alexanderkjall)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Ivan](https://github.com/vaano94)
|
||||
[JCzogalla](https://github.com/JCzogalla)
|
||||
[Jamie Pullar](https://github.com/JamiePullar)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Pavel Raiskup](https://github.com/praiskup)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
95
docs/_posts/2018-03-15-42.2.2-release.md
Normal file
95
docs/_posts/2018-03-15-42.2.2-release.md
Normal file
@ -0,0 +1,95 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.2 Released
|
||||
date: 2018-03-15 18:55:14 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.2
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Added
|
||||
- Documentation on server-side prepared statements [PR 1135](https://github.com/pgjdbc/pgjdbc/pull/1135)
|
||||
|
||||
### Fixed
|
||||
- Avoid failure for `insert ... on conflict...update` for `reWriteBatchedInserts=true` case [PR 1130](https://github.com/pgjdbc/pgjdbc/pull/1130)
|
||||
- fix: allowEncodingChanges should allow set client_encoding=... [PR 1125](https://github.com/pgjdbc/pgjdbc/pull/1125)
|
||||
- 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)
|
||||
- Support generated keys when INSERT/UPDATE/DELETE keyword is followed by a comment [PR 1138](https://github.com/pgjdbc/pgjdbc/pull/1138)
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Dave Cramer (5):
|
||||
|
||||
* Update java8-date-time.md [643e5583](https://github.com/pgjdbc/pgjdbc/commit/643e5583fe34c28602af21eb766acbc56a7b26d7)
|
||||
* Update about.html [6fe76a3c](https://github.com/pgjdbc/pgjdbc/commit/6fe76a3c9289c78b2a8875e101020747584c36a7)
|
||||
* Update documentation.md [3b3fd8c9](https://github.com/pgjdbc/pgjdbc/commit/3b3fd8c90a4bdcde101f45ae255ca2fe30bac338)
|
||||
* Update documentation.md [a8ef9f96](https://github.com/pgjdbc/pgjdbc/commit/a8ef9f96feb02246a3d7967ada2ffe146778f7ed)
|
||||
* test: add Travis configuration to test SSL [PR 1095](https://github.com/pgjdbc/pgjdbc/pull/1095) [298683b1](https://github.com/pgjdbc/pgjdbc/commit/298683b1bd11a4b16cdba861c8ca93134cfb037b)
|
||||
|
||||
Jorge Solorzano (1):
|
||||
|
||||
* fix: improve DatabaseMetaData.getSQLKeywords() [PR 940](https://github.com/pgjdbc/pgjdbc/pull/940) [7a586b6e](https://github.com/pgjdbc/pgjdbc/commit/7a586b6e492e8911a928d50113a68569981fa731)
|
||||
|
||||
Pawel (1):
|
||||
|
||||
* Fixes #1096 [PR 1097](https://github.com/pgjdbc/pgjdbc/pull/1097) [df4e7fa0](https://github.com/pgjdbc/pgjdbc/commit/df4e7fa07c205e12f7fe5e3c80ab90ea63c1bc17)
|
||||
|
||||
Selene Feigl (1):
|
||||
|
||||
* fix: wrong data from Blob/Clob when mark/reset is used [PR 971](https://github.com/pgjdbc/pgjdbc/pull/971) [61e1c300](https://github.com/pgjdbc/pgjdbc/commit/61e1c300fb52237b05b7649d61603dd339fbdd9b)
|
||||
|
||||
Simon Stelling (1):
|
||||
|
||||
* fix: handle Timestamp values with fractional seconds < 1 microsecond correctly in PreparedStatement arguments [PR 1119](https://github.com/pgjdbc/pgjdbc/pull/1119) [8ff2a617](https://github.com/pgjdbc/pgjdbc/commit/8ff2a617c8a153eb364d8b762102b6b6b1cb53f8)
|
||||
|
||||
Vladimir Sitnikov (14):
|
||||
|
||||
* docs: reflect 42.2.1 release in readme.md [1a4256b9](https://github.com/pgjdbc/pgjdbc/commit/1a4256b973da36c0fc42f0268e58e1535073247b)
|
||||
* chore: make sure TEST_CLIENTS performs regular tests as well [aa676bb3](https://github.com/pgjdbc/pgjdbc/commit/aa676bb39117dc47cbd51a236b232227e9128220)
|
||||
* chore: remove unused variable lastKnownTime in ConnectionFactoryImpl [48b98971](https://github.com/pgjdbc/pgjdbc/commit/48b98971d085a7988b67a31cf5ff9fb52c5534e5)
|
||||
* fix: ArrayIndexOutOfBoundsException when using the same SQL for regular and updateable resultset [PR 1123](https://github.com/pgjdbc/pgjdbc/pull/1123) [45c32bc6](https://github.com/pgjdbc/pgjdbc/commit/45c32bc6af2e140ff86dabd718344c74fc244394)
|
||||
* fix: support insert ... on conflict...update for reWriteBatchedInserts=true [PR 1130](https://github.com/pgjdbc/pgjdbc/pull/1130) [1ca0c586](https://github.com/pgjdbc/pgjdbc/commit/1ca0c5864a8b6c575b32aee03e2e1e8848fee143)
|
||||
* fix: allowEncodingChanges should allow set client_encoding=... [PR 1125](https://github.com/pgjdbc/pgjdbc/pull/1125) [af64ed2d](https://github.com/pgjdbc/pgjdbc/commit/af64ed2dac035c621b4aec4a0471730457725194)
|
||||
* tests: UUID vs setString test [PR 1133](https://github.com/pgjdbc/pgjdbc/pull/1133) [5827858b](https://github.com/pgjdbc/pgjdbc/commit/5827858ba5b72b519feb86fc65301a7bffa10c4d)
|
||||
* fix: UUID test for preferQueryMode=simple [44bb7f8d](https://github.com/pgjdbc/pgjdbc/commit/44bb7f8d66829705bf46a6cfcad8a179eb14e441)
|
||||
* fix: wrong results when a single statement is used with UNSPECIFIED types [PR 1137](https://github.com/pgjdbc/pgjdbc/pull/1137) [fcd1ea14](https://github.com/pgjdbc/pgjdbc/commit/fcd1ea14545a113fe4a124e17132824e279f572e)
|
||||
* test: workaround DST issue in StatementTest#testDateFunctions [af499625](https://github.com/pgjdbc/pgjdbc/commit/af499625fb99043fe0bf605ec4b23f3dd64c18d7)
|
||||
* docs: improve documentation and tests for server-side prepared statements [PR 1135](https://github.com/pgjdbc/pgjdbc/pull/1135) [4204f094](https://github.com/pgjdbc/pgjdbc/commit/4204f09446edbc7caaecb4c8cd7c8f78abd9344e)
|
||||
* test: make testAlternatingBindType Java 6-compatible [PR 1139](https://github.com/pgjdbc/pgjdbc/pull/1139) [bcdd4273](https://github.com/pgjdbc/pgjdbc/commit/bcdd4273bba7ae6b3348d47d4cdeb72e941d5acc)
|
||||
* fix: better support for RETURNING for WITH queries and queries with comments [PR 1138](https://github.com/pgjdbc/pgjdbc/pull/1138) [04e76661](https://github.com/pgjdbc/pgjdbc/commit/04e76661586b54157a1220552c005569231388a9)
|
||||
* chore: add contributor links to release script [2568d38e](https://github.com/pgjdbc/pgjdbc/commit/2568d38e5ff7c9b23f92011c7dc936c307f53008)
|
||||
|
||||
bpd0018 (3):
|
||||
|
||||
* docs: fix spelling and chapter, update sample code [PR 1098](https://github.com/pgjdbc/pgjdbc/pull/1098) [0cfffa84](https://github.com/pgjdbc/pgjdbc/commit/0cfffa841b9b8d2040fe6c576aa77edfd399bbc0)
|
||||
* style: spelling in comment [PR 1121](https://github.com/pgjdbc/pgjdbc/pull/1121) [cc219aa7](https://github.com/pgjdbc/pgjdbc/commit/cc219aa79b37f03432db4fe61e06b5f27fcb7f83)
|
||||
* docs: fix JavaDoc for getPreferQueryMode() [PR 1122](https://github.com/pgjdbc/pgjdbc/pull/1122) [43d80cd4](https://github.com/pgjdbc/pgjdbc/commit/43d80cd48a54ea91868d15bd2f3806b467519883)
|
||||
|
||||
chalda (1):
|
||||
|
||||
* Adjust XAException return codes for better compatibility with XA specification [PR 782](https://github.com/pgjdbc/pgjdbc/pull/782) [e5aab1cd](https://github.com/pgjdbc/pgjdbc/commit/e5aab1cd3e49051f46298d8f1fd9f66af1731299)
|
||||
|
||||
trtrmitya (1):
|
||||
|
||||
* fix: use Locale.Category.DISPLAY (~lc_messages) when selecting resource bundle. [PR 1115](https://github.com/pgjdbc/pgjdbc/pull/1115) [0e9dfce4](https://github.com/pgjdbc/pgjdbc/commit/0e9dfce42c80391d0eefa830600e0ac4c1baae50)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[Pawel](https://github.com/veselov)
|
||||
[Selene Feigl](https://github.com/sfeigl)
|
||||
[Simon Stelling](https://github.com/stellingsimon)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
||||
[bpd0018](https://github.com/bpd0018)
|
||||
[chalda](https://github.com/ochaloup)
|
||||
[trtrmitya](https://github.com/trtrmitya)
|
160
docs/_posts/2018-07-12-42.2.3-release.md
Normal file
160
docs/_posts/2018-07-12-42.2.3-release.md
Normal file
@ -0,0 +1,160 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.3 Released
|
||||
date: 2018-07-12 12:02:03 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.3
|
||||
---
|
||||
**Notable changes**
|
||||
### Known issues
|
||||
- SQL\_TSI\_YEAR is treated as hour, SQL\_TSI\_WEEK is treated as hour, SQL\_TSI\_MINUTE is treated as second (fixed in 42.2.4)
|
||||
|
||||
### Changed
|
||||
- Reduce the severity of the error log messages when an exception is re-thrown. The error will be thrown to caller to be dealt with so no need to log at this verbosity by pgjdbc [PR 1187](https://github.com/pgjdbc/pgjdbc/pull/1187)
|
||||
- Deprecate Fastpath API [PR 903](https://github.com/pgjdbc/pgjdbc/pull/903)
|
||||
- Support parenthesis in {oj ...} JDBC escape syntax [PR 1204](https://github.com/pgjdbc/pgjdbc/pull/1204)
|
||||
- ubenchmark module moved pgjdbc/benchmarks repository due to licensing issues [PR 1215](https://github.com/pgjdbc/pgjdbc/pull/1215)
|
||||
- Include section on how to submit a bug report in CONTRIBUTING.md [PR 951](https://github.com/pgjdbc/pgjdbc/pull/951)
|
||||
|
||||
### Fixed
|
||||
- getString for PGObject-based types returned "null" string instead of null [PR 1154](https://github.com/pgjdbc/pgjdbc/pull/1154)
|
||||
- Field metadata cache can be disabled via databaseMetadataCacheFields=0 [PR 1052](https://github.com/pgjdbc/pgjdbc/pull/1152)
|
||||
- Properly encode special symbols in passwords in BaseDataSource [PR 1201](https://github.com/pgjdbc/pgjdbc/pull/1201)
|
||||
- Adjust date, hour, minute, second when rounding nanosecond part of a timestamp [PR 1212](https://github.com/pgjdbc/pgjdbc/pull/1212)
|
||||
- perf: reduce memory allocations in query cache [PR 1227](https://github.com/pgjdbc/pgjdbc/pull/1227)
|
||||
- perf: reduce memory allocations in SQL parser [PR 1230](https://github.com/pgjdbc/pgjdbc/pull/1230), [PR 1233](https://github.com/pgjdbc/pgjdbc/pull/1233)
|
||||
- Encode URL parameters in BaseDataSource [PR 1201](https://github.com/pgjdbc/pgjdbc/pull/1201)
|
||||
- Improve JavaDoc formatting [PR 1236](https://github.com/pgjdbc/pgjdbc/pull/1236)
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
AlBundy33 (1):
|
||||
|
||||
* fix: support parenthesis in {oj ...} JDBC escape syntax [PR 865](https://github.com/pgjdbc/pgjdbc/pull/865) [38356e68](https://github.com/pgjdbc/pgjdbc/commit/38356e6889613a65fc48a455495f18dbb3565731)
|
||||
|
||||
AlexElin (3):
|
||||
|
||||
* refactor: deprecate Fastpath API [PR 903](https://github.com/pgjdbc/pgjdbc/pull/903) [f8e21b63](https://github.com/pgjdbc/pgjdbc/commit/f8e21b63071f39f7f7754bfbfd051828884c1fd5)
|
||||
* refactor: migrate MultiHostsConnectionTest to JUnit4 [PR 886](https://github.com/pgjdbc/pgjdbc/pull/886) [17a4d6a5](https://github.com/pgjdbc/pgjdbc/commit/17a4d6a500d4456c8bcac63d3d0cbb282fc99bea)
|
||||
* refactor: simplify PgConnection.java [PR 1047](https://github.com/pgjdbc/pgjdbc/pull/1047) [ba360f73](https://github.com/pgjdbc/pgjdbc/commit/ba360f731cb9a2eca9924b700cee234aba572fe5)
|
||||
|
||||
Dave Cramer (3):
|
||||
|
||||
* fixed spelling mistake in PostgreSQL [PR 1202](https://github.com/pgjdbc/pgjdbc/pull/1202) [b92bd65a](https://github.com/pgjdbc/pgjdbc/commit/b92bd65a0860cc9f34b667a9fa34d7acca6aac5d)
|
||||
* docs: improve javadocs in PgResultSetMetaData [PR 792](https://github.com/pgjdbc/pgjdbc/pull/792) [825c0924](https://github.com/pgjdbc/pgjdbc/commit/825c092483aa8a4ea1d0937cd081f1657983aa6d)
|
||||
* minor language updates [PR 1241](https://github.com/pgjdbc/pgjdbc/pull/1241) [e19ee7ae](https://github.com/pgjdbc/pgjdbc/commit/e19ee7ae5742ec0cd8976c66ae22e7e500e0107b)
|
||||
|
||||
Hari Babu Kommi (2):
|
||||
|
||||
* spelling mistake correction [PR 1181](https://github.com/pgjdbc/pgjdbc/pull/1181) [e88abd79](https://github.com/pgjdbc/pgjdbc/commit/e88abd79bae4eab71561539784ccdb6b04d52cee)
|
||||
* fix: set the loggerName in ConnectionFactoryImpl.log [PR 1188](https://github.com/pgjdbc/pgjdbc/pull/1188) [f78a639d](https://github.com/pgjdbc/pgjdbc/commit/f78a639d1ed3c64e80e1fa107691b4af5945cb84)
|
||||
|
||||
Jesper Pedersen (1):
|
||||
|
||||
* perf: guard logging statements [PR 1112](https://github.com/pgjdbc/pgjdbc/pull/1112) [7a0b7d65](https://github.com/pgjdbc/pgjdbc/commit/7a0b7d65582a21376fc114eb197b5bae1fe1ea00)
|
||||
|
||||
Jorge Solorzano (6):
|
||||
|
||||
* fix: error on Travis build head [PR 1186](https://github.com/pgjdbc/pgjdbc/pull/1186) [354d2857](https://github.com/pgjdbc/pgjdbc/commit/354d2857664559636a4d3b18568cb69adc47f349)
|
||||
* test: add coverage for extendedCacheEverything [PR 1062](https://github.com/pgjdbc/pgjdbc/pull/1062) [f4d503c2](https://github.com/pgjdbc/pgjdbc/commit/f4d503c2ef449e8c2db0c23c27aedb09af30df62)
|
||||
* Update after\_n\_builds to 10 [PR 1193](https://github.com/pgjdbc/pgjdbc/pull/1193) [2f9fed45](https://github.com/pgjdbc/pgjdbc/commit/2f9fed45104b56d7e2b2802359a04321755266a6)
|
||||
* test: drop OpenJ9 CI tests [PR 1196](https://github.com/pgjdbc/pgjdbc/pull/1196) [9b6506df](https://github.com/pgjdbc/pgjdbc/commit/9b6506dfa1076ad27a16de8fc3e85bc23f1a5b97)
|
||||
* fix: logger should be generally quiet [PR 1187](https://github.com/pgjdbc/pgjdbc/pull/1187) [30f06e14](https://github.com/pgjdbc/pgjdbc/commit/30f06e1411373d72ab59debc352ddf746f6812da)
|
||||
* docs: improve CONTRIBUTING.md [PR 951](https://github.com/pgjdbc/pgjdbc/pull/951) [38c8845e](https://github.com/pgjdbc/pgjdbc/commit/38c8845e645cabce89e7610d1d5e735cc30543b1)
|
||||
|
||||
KimBisgaardDmi (1):
|
||||
|
||||
* fix: getString for PGObject columns returns null [PR 1154](https://github.com/pgjdbc/pgjdbc/pull/1154) [bbb6c1f8](https://github.com/pgjdbc/pgjdbc/commit/bbb6c1f8ac395fa793e09216ba3b710b0f6a2077)
|
||||
|
||||
Marc Slemko (1):
|
||||
|
||||
* fix: allow disabling field metadata cache [PR 1052](https://github.com/pgjdbc/pgjdbc/pull/1052) [6ce91721](https://github.com/pgjdbc/pgjdbc/commit/6ce91721048dea0e73231fa50c365108e9b9d49d)
|
||||
|
||||
Michele Mancioppi (1):
|
||||
|
||||
* docs: clarify database and username for the build [PR 859](https://github.com/pgjdbc/pgjdbc/pull/859) [83f2e385](https://github.com/pgjdbc/pgjdbc/commit/83f2e385947c56376a03fc14178f5d28e427c832)
|
||||
|
||||
Pavel Raiskup (1):
|
||||
|
||||
* packaging: fix RPM build requirements [6bb72e69](https://github.com/pgjdbc/pgjdbc/commit/6bb72e69ee274e55a5ec08aec3316aa78aa3fab4)
|
||||
|
||||
Sidi Mohamed EL AATIFI (1):
|
||||
|
||||
* Fix typos in java8-date-time.md [PR 1174](https://github.com/pgjdbc/pgjdbc/pull/1174) [dde8c020](https://github.com/pgjdbc/pgjdbc/commit/dde8c0200c409a525ef3bfc7a0aa81e7cd458a59)
|
||||
|
||||
Stephen Nelson (2):
|
||||
|
||||
* chore: add missing javadoc tags to avoid warnings [PR 1164](https://github.com/pgjdbc/pgjdbc/pull/1164) [e9ced455](https://github.com/pgjdbc/pgjdbc/commit/e9ced455fd118731eb7dea38a63e0b400df32a1b)
|
||||
* docs: correct the Javadoc and enforce with Checkstyle [PR 1236](https://github.com/pgjdbc/pgjdbc/pull/1236) [08631ccd](https://github.com/pgjdbc/pgjdbc/commit/08631ccdabdb8ba6d52f398e2b0b46a9cf0cafbf)
|
||||
|
||||
Vladimir Sitnikov (19):
|
||||
|
||||
* reflect 42.2.2 release in readme.md [b1581e99](https://github.com/pgjdbc/pgjdbc/commit/b1581e99b6da96b6e44753ce231ec3acf9869fea)
|
||||
* fix: avoid NPE in PgConnection.finalize [PR 1206](https://github.com/pgjdbc/pgjdbc/pull/1206) [03a1441b](https://github.com/pgjdbc/pgjdbc/commit/03a1441bbe98525412df754d3934141bc3b12168)
|
||||
* chore: update gettext plugin, sort po files [eb5c8fdd](https://github.com/pgjdbc/pgjdbc/commit/eb5c8fdd6b37eb29262713584d01d73b8b7d299a)
|
||||
* chore: sort messages in *.po files [10fc2fbb](https://github.com/pgjdbc/pgjdbc/commit/10fc2fbb35537e4f75c22dc7614f76b376e3f0d8)
|
||||
* chore: remove obsolete translations [ed1eab9e](https://github.com/pgjdbc/pgjdbc/commit/ed1eab9ef70e499310f6730ce7ef0d5bf7bfb3ae)
|
||||
* doc: add Russian translation to "No IOException expected..." [eaa0acad](https://github.com/pgjdbc/pgjdbc/commit/eaa0acad343027bf8be48b3229ef9f6386d67810)
|
||||
* fix: adjust date, hour, minute, second when rounding timestamp [PR 1212](https://github.com/pgjdbc/pgjdbc/pull/1212) [4dc98be8](https://github.com/pgjdbc/pgjdbc/commit/4dc98be81829bbff3bb00c23214606757df16fab)
|
||||
* chore: remove ubenchmark module due to licensing issues [PR 1215](https://github.com/pgjdbc/pgjdbc/pull/1215) [88ec13bb](https://github.com/pgjdbc/pgjdbc/commit/88ec13bb67d5bb2dbd2fc57046e05f9a3eb66abb)
|
||||
* chore: remove ubenchmark from packaging/rpm as well [a699965a](https://github.com/pgjdbc/pgjdbc/commit/a699965ae209c32ce234fb455f04ffe6b1d1e0e5)
|
||||
* fix: support query timeouts exceeding 2147483 seconds (~25 days) [PR 1224](https://github.com/pgjdbc/pgjdbc/pull/1224) [b7fd9f3c](https://github.com/pgjdbc/pgjdbc/commit/b7fd9f3cef734b4c219e2f6bc6c19acf68b2990b)
|
||||
* perf: improve performance of replacing JDBC {...} escapes [PR 1230](https://github.com/pgjdbc/pgjdbc/pull/1230) [177f63be](https://github.com/pgjdbc/pgjdbc/commit/177f63be788a80529bfa7c2234cfabb039cc29b4)
|
||||
* docs: use union merge strategy for CHANGELOG [PR 1107](https://github.com/pgjdbc/pgjdbc/pull/1107) [70189203](https://github.com/pgjdbc/pgjdbc/commit/70189203574d9f0faf37b8a9bcee1d76ffa6b676)
|
||||
* chore: use 5432 as default port when running code from IDE [5dc03f63](https://github.com/pgjdbc/pgjdbc/commit/5dc03f63f170ed371a4f4ba06d491be489627b11)
|
||||
* docs: use "PR 42" references instead of "PR[PR 42](https://github.com/pgjdbc/pgjdbc/pull/42)" in the changelog (#1239) [f4ae60ec](https://github.com/pgjdbc/pgjdbc/commit/f4ae60eca7b6dd8828f9e1b7a53c1dfee38f8201)
|
||||
* test: close of replication connection has not been fixed at backend side, so disable the test till 12.1 [PR 1243](https://github.com/pgjdbc/pgjdbc/pull/1243) [481460a3](https://github.com/pgjdbc/pgjdbc/commit/481460a32426c3d3a532f2a9a1b078ed9e98129a)
|
||||
* perf: avoid string allocation for oid/rows parsing in command tag [PR 1232](https://github.com/pgjdbc/pgjdbc/pull/1232) [da831de5](https://github.com/pgjdbc/pgjdbc/commit/da831de521953aa1c168928173c9e75336682e29)
|
||||
* docs: prepare changelog for 42.2.3 release [c5f5d8d2](https://github.com/pgjdbc/pgjdbc/commit/c5f5d8d28f34ad9acaa58b241ad4a265547c990b)
|
||||
* chore: fetch contributors' URL via GitHub API [d7297984](https://github.com/pgjdbc/pgjdbc/commit/d7297984a27c5a033571fbfcece62a1c849e2ec0)
|
||||
* docs: update site for 42.2.3
|
||||
|
||||
bazzargh (1):
|
||||
|
||||
* fix: encode url query parameters DataSource [PR 1201](https://github.com/pgjdbc/pgjdbc/pull/1201) [9f3838f7](https://github.com/pgjdbc/pgjdbc/commit/9f3838f749d370a13a2fcef8e3ef67062d6e35eb)
|
||||
|
||||
benbenw (2):
|
||||
|
||||
* refactor: remove obsolete outParmBeforeFunc [PR 1234](https://github.com/pgjdbc/pgjdbc/pull/1234) [71028532](https://github.com/pgjdbc/pgjdbc/commit/71028532bcbc36e8239a4a7f9ad87e1acd070dc9)
|
||||
* perf: improve parsing performance of JDBC-style { call ...} calls [PR 1233](https://github.com/pgjdbc/pgjdbc/pull/1233) [435e2f79](https://github.com/pgjdbc/pgjdbc/commit/435e2f791bc848494b4f08c5d0b90ecf520ae5fe)
|
||||
|
||||
benoit (3):
|
||||
|
||||
* perf: reduce memory allocations when JDBC escapes ({fn ...}) are used [2a1e0910](https://github.com/pgjdbc/pgjdbc/commit/2a1e09100c4d56a37c84668135ec7fe3e05962cb)
|
||||
* refactor: use singleArgumentFunctionCall in EscapedFunctions [191d84eb](https://github.com/pgjdbc/pgjdbc/commit/191d84eb7541a0eba0a0f0eaac0f45e6e0c80ce4)
|
||||
* perf: avoid BaseQueryKey.toString in CachedQuery.getSize [PR 1227](https://github.com/pgjdbc/pgjdbc/pull/1227) [669fc31e](https://github.com/pgjdbc/pgjdbc/commit/669fc31ec187b27d15ee24f84c389260c54ddf25)
|
||||
|
||||
bpd0018 (1):
|
||||
|
||||
* style: rephrase comment on named portals [PR 1129](https://github.com/pgjdbc/pgjdbc/pull/1129) [86c46f94](https://github.com/pgjdbc/pgjdbc/commit/86c46f94535823ab7f6edde25f38d6e1182272a0)
|
||||
|
||||
Étienne BERSAC (1):
|
||||
|
||||
* docs: fix link to GitHub documentation [PR 1191](https://github.com/pgjdbc/pgjdbc/pull/1191) [655b6e70](https://github.com/pgjdbc/pgjdbc/commit/655b6e70b471da29b49124399eb0dab607dfc221)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[AlBundy33](https://github.com/AlBundy33)
|
||||
[AlexElin](https://github.com/AlexElin)
|
||||
[bazzargh](https://github.com/bazzargh)
|
||||
[benbenw](https://github.com/benbenw)
|
||||
[benoit](https://github.com/benbenw)
|
||||
[bpd0018](https://github.com/bpd0018)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Étienne BERSAC](https://github.com/bersace)
|
||||
[Hari Babu Kommi](https://github.com/kommiharibabu)
|
||||
[Jesper Pedersen](https://github.com/jesperpedersen)
|
||||
[Jorge Solorzano](https://github.com/jorsol)
|
||||
[KimBisgaardDmi](https://github.com/KimBisgaardDmi)
|
||||
[Marc Slemko](https://github.com/znep)
|
||||
[Michele Mancioppi](https://github.com/michele-mancioppi)
|
||||
[Pavel Raiskup](https://github.com/praiskup)
|
||||
[Sidi Mohamed EL AATIFI](https://github.com/elaatifi)
|
||||
[Stephen Nelson](https://github.com/lordnelson)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
55
docs/_posts/2018-07-14-42.2.4-release.md
Normal file
55
docs/_posts/2018-07-14-42.2.4-release.md
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.4 Released
|
||||
date: 2018-07-14 19:02:04 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.4
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Changed
|
||||
- PreparedStatement.setNull(int parameterIndex, int t, String typeName) no longer ignores the typeName
|
||||
argument if it is not null [PR 1160](https://github.com/pgjdbc/pgjdbc/pull/1160)
|
||||
|
||||
### Fixed
|
||||
- Fix treatment of SQL\_TSI\_YEAR, SQL\_TSI\_WEEK, SQL\_TSI\_MINUTE [PR 1250](https://github.com/pgjdbc/pgjdbc/pull/1250)
|
||||
- Map integrity constraint violation to XA\_RBINTEGRITY instead of XAER\_RMFAIL [PR 1175](https://github.com/pgjdbc/pgjdbc/pull/1175) [f2d1352c](https://github.com/pgjdbc/pgjdbc/commit/f2d1352c2b3ea98492beb6127cd6d95039a0b92f)
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Christian Kotzbauer (1):
|
||||
|
||||
* Fixed typo in CHANGELOG.md [PR 1249](https://github.com/pgjdbc/pgjdbc/pull/1249) [b20df919](https://github.com/pgjdbc/pgjdbc/commit/b20df919a45435804b17f77da3a80aedd6675e15)
|
||||
|
||||
Dave Cramer (3):
|
||||
|
||||
* use the correct date for the release [985b63b7](https://github.com/pgjdbc/pgjdbc/commit/985b63b7228f3ef34159b68c1a4192c749994ef3)
|
||||
* also fix spelling of error [b0162c0a](https://github.com/pgjdbc/pgjdbc/commit/b0162c0a44075586a666a9d431b2230e2568a973)
|
||||
* fix: setNull for types not in java.sql.Types (e.g. uuid) [PR 1160](https://github.com/pgjdbc/pgjdbc/pull/1160) [6287c954](https://github.com/pgjdbc/pgjdbc/commit/6287c9547880b5cdfc596cf932354511a4e310cb)
|
||||
|
||||
Jan Van den Bergh (1):
|
||||
|
||||
* fix: map integrity constraint violation to XA\_RBINTEGRITY instead of XAER\_RMFAIL [PR 1175](https://github.com/pgjdbc/pgjdbc/pull/1175) [f2d1352c](https://github.com/pgjdbc/pgjdbc/commit/f2d1352c2b3ea98492beb6127cd6d95039a0b92f)
|
||||
|
||||
Pavel Raiskup (1):
|
||||
|
||||
* packaging: sync RPM spec with Fedora Rawhide [cc545d28](https://github.com/pgjdbc/pgjdbc/commit/cc545d28d632dcd6bb9ec06680ff2e1a12de246a)
|
||||
|
||||
Vladimir Sitnikov (2):
|
||||
|
||||
* docs: fix broken commit link in 42.2.3 changelog [776e1717](https://github.com/pgjdbc/pgjdbc/commit/776e1717cfe34219dba2f04e2a808d8ca867a860)
|
||||
* fix: treatment of SQL\_TSI\_YEAR, SQL\_TSI\_WEEK, SQL\_TSI\_MINUTE [PR 1250](https://github.com/pgjdbc/pgjdbc/pull/1250) [4668f43f](https://github.com/pgjdbc/pgjdbc/commit/4668f43fa11fabce9d12d8c9ade73b9426061284)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Christian Kotzbauer](https://github.com/code-chris)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Jan Van den Bergh](https://github.com/janvdbergh)
|
||||
[Pavel Raiskup](https://github.com/praiskup)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
75
docs/_posts/2018-08-27-42.2.5-release.md
Normal file
75
docs/_posts/2018-08-27-42.2.5-release.md
Normal file
@ -0,0 +1,75 @@
|
||||
---
|
||||
title: PostgreSQL JDBC Driver 42.2.5 Released
|
||||
date: 2018-08-27 18:21:38 +0300
|
||||
categories:
|
||||
- new_release
|
||||
version: 42.2.5
|
||||
---
|
||||
**Notable changes**
|
||||
|
||||
### Changed
|
||||
- `ssl=true` implies `sslmode=verify-full`, that is it requires valid server certificate [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
|
||||
### Added
|
||||
- Support for `sslmode=allow/prefer/require` [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
|
||||
### Fixed
|
||||
- Security: added server hostname verification for non-default SSL factories in `sslmode=verify-full` (CVE-2018-10936) [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
- Updated documentation on SSL configuration [fa032732](https://github.com/pgjdbc/pgjdbc/commit/fa032732acfe51c6e663ee646dd5c1beaa1af857)
|
||||
- Updated Japanese translations [PR 1275](https://github.com/pgjdbc/pgjdbc/pull/1275)
|
||||
- IndexOutOfBounds on prepared multistatement with insert values [c2885dd0](https://github.com/pgjdbc/pgjdbc/commit/c2885dd0cfc793f81e5dd3ed2300bb32476eb14a)
|
||||
|
||||
|
||||
<!--more-->
|
||||
|
||||
**Commits by author**
|
||||
|
||||
Christoph Berg (1):
|
||||
|
||||
* chore: remove editor backup files [PR 1255](https://github.com/pgjdbc/pgjdbc/pull/1255) [b1b1afb8](https://github.com/pgjdbc/pgjdbc/commit/b1b1afb829fae06bcefce443e66d823f4f92fed5)
|
||||
|
||||
Dave Cramer (4):
|
||||
|
||||
* Update Contributing.md [1f8ac406](https://github.com/pgjdbc/pgjdbc/commit/1f8ac4063b1fd04ccc05616e3533d68be9912333)
|
||||
* Add issue templates [PR 1263](https://github.com/pgjdbc/pgjdbc/pull/1263) [c66bf710](https://github.com/pgjdbc/pgjdbc/commit/c66bf7108dd36f50aacebfd4f09e383aed02424b)
|
||||
* move issue template and pull request template into github specific di… [PR 1283](https://github.com/pgjdbc/pgjdbc/pull/1283) [b5c19af6](https://github.com/pgjdbc/pgjdbc/commit/b5c19af627c8650410495ad8e3f2ee85e687e3c1)
|
||||
* docs: improve documentation on SSL [fa032732](https://github.com/pgjdbc/pgjdbc/commit/fa032732acfe51c6e663ee646dd5c1beaa1af857)
|
||||
|
||||
Kazuhiro Sera (1):
|
||||
|
||||
* docs: fix typos detected by github.com/client9/misspell [PR 1287](https://github.com/pgjdbc/pgjdbc/pull/1287) [9534e9ca](https://github.com/pgjdbc/pgjdbc/commit/9534e9ca0e1840445ad5f4eee75bc1e2ac102dde)
|
||||
|
||||
Kyotaro Horiguchi (1):
|
||||
|
||||
* fix: Japanese translation [PR 1275](https://github.com/pgjdbc/pgjdbc/pull/1275) [993a3beb](https://github.com/pgjdbc/pgjdbc/commit/993a3beba10aed73418340b14f2d3420c8984de5)
|
||||
|
||||
Sehrope Sarkuni (1):
|
||||
|
||||
* fix: Correct typo in CopyManager comment [PR 1285](https://github.com/pgjdbc/pgjdbc/pull/1285) [203a106d](https://github.com/pgjdbc/pgjdbc/commit/203a106ddc9eb0d94cc94838f4fb0924e37f441a)
|
||||
|
||||
Vladimir Sitnikov (12):
|
||||
|
||||
* reflect 42.2.4 release in readme.md [b99cea0d](https://github.com/pgjdbc/pgjdbc/commit/b99cea0de0e67f0c641c77bcbff8d2889a441290)
|
||||
* doc: add SQL_TSI to the known issues for 42.2.3 [ci-skip] [2da319a0](https://github.com/pgjdbc/pgjdbc/commit/2da319a07d47015467bd3ace029827f67f4778bc)
|
||||
* docs: escape underscores in changelog otherwise it produces italic [b1507f84](https://github.com/pgjdbc/pgjdbc/commit/b1507f849b732012d5312c79a62dad24fd6a7261)
|
||||
* docs: typo in 42.2.3 changelog "minute->second" [5898cdf1](https://github.com/pgjdbc/pgjdbc/commit/5898cdf1e314f2db7889456fb1ad6822021bd543)
|
||||
* refactor: remove unused PgPreparedStatement.adjustIndex [PR 1253](https://github.com/pgjdbc/pgjdbc/pull/1253) [178eecc9](https://github.com/pgjdbc/pgjdbc/commit/178eecc90643b36c8c5cd423ff311b26733384f2)
|
||||
* test: run testShortQueryTimeout in PG_VERSION=HEAD Travis job only [PR 1270](https://github.com/pgjdbc/pgjdbc/pull/1270) [ecd412e4](https://github.com/pgjdbc/pgjdbc/commit/ecd412e4164bbfcccd96f778c874dd4f40330354)
|
||||
* fix: remove POT-Creation-Date from generated .po and .pot files [PR 1269](https://github.com/pgjdbc/pgjdbc/pull/1269) [450a496b](https://github.com/pgjdbc/pgjdbc/commit/450a496be8b14e14fa0821413ed532c49275dc9e)
|
||||
* fix: use UTF-8 encoding in generated translation/messages_*.java files [2cbe7b35](https://github.com/pgjdbc/pgjdbc/commit/2cbe7b354543e2ae526c3d9a422949acd0a375b6)
|
||||
* fix: typo in "One ore more ClientInfo failed" error message [ci skip] [21e126f4](https://github.com/pgjdbc/pgjdbc/commit/21e126f451df667627c1cc3a0acfb3c38be45ffa)
|
||||
* fix: IndexOutOfBounds on prepared multistatement with insert values [PR 1289](https://github.com/pgjdbc/pgjdbc/pull/1289) [c2885dd0](https://github.com/pgjdbc/pgjdbc/commit/c2885dd0cfc793f81e5dd3ed2300bb32476eb14a)
|
||||
* security: implement SSL hostname verification for non-default (LibPQFactory) SSL factories (CVE-2018-10936) [cdeeaca4](https://github.com/pgjdbc/pgjdbc/commit/cdeeaca47dc3bc6f727c79a582c9e4123099526e)
|
||||
* Update changelog for 42.2.5 [237a89bf](https://github.com/pgjdbc/pgjdbc/commit/237a89bf3058a16a3de37b8c92d2a4d850c6c056)
|
||||
|
||||
<a name="contributors_{{ page.version }}"></a>
|
||||
### Contributors to this release
|
||||
|
||||
We thank the following people for their contributions to this release.
|
||||
|
||||
[Christoph Berg](https://github.com/ChristophBerg)
|
||||
[Dave Cramer](davec@postgresintl.com)
|
||||
[Kazuhiro Sera](https://github.com/seratch)
|
||||
[Kyotaro Horiguchi](https://github.com/horiguti)
|
||||
[Sehrope Sarkuni](https://github.com/sehrope)
|
||||
[Vladimir Sitnikov](https://github.com/vlsi)
|
29
docs/about/about.html
Normal file
29
docs/about/about.html
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC About
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_about.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>About</h1>
|
||||
<p>
|
||||
<strong>PostgreSQL JDBC Driver</strong> (<em>PgJDBC</em> for short) allows Java programs to connect to a PostgreSQL database using standard,
|
||||
database independent Java code. Is an open source JDBC driver written in Pure Java (Type 4), and communicates in
|
||||
the PostgreSQL native network protocol.<br/><br/>
|
||||
The current version of the driver should be compatible with <strong>PostgreSQL 8.2 and higher</strong>,
|
||||
and <strong>Java 6</strong> (JDBC 4.0), <strong>Java 7</strong> (JDBC 4.1), <strong>Java 8</strong> (JDBC 4.2) and <strong>Java 9</strong>.<br/><br/>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<h1>Features</h1>
|
||||
<p>
|
||||
The driver provides a reasonably complete implementation of the JDBC specification in addition
|
||||
to some PostgreSQL specific extensions. Our goal is nothing short of full compliance, but we're not
|
||||
there yet. Some features require additional backend support and others just need someone to implement
|
||||
them. For a list of what still needs to be done see our <a href="../development/todo.html">Todo</a>
|
||||
list.
|
||||
</p>
|
||||
</div> <!-- pgContentWrap -->
|
43
docs/about/extras.html
Normal file
43
docs/about/extras.html
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Extras
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_about.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Extras</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<ul class="minitoc">
|
||||
<li><a href="#intro">Introduction</a></li>
|
||||
<li><a href="#jdbccache">Statement Caching Wrapper</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="intro"></a>
|
||||
<h2 class="underlined_10">Introduction</h2>
|
||||
<div>
|
||||
<p>
|
||||
Here is a collection of things that may be useful to you that
|
||||
are not part of the core driver. For assistance or support you
|
||||
should contact the channels specified in each item, instead of
|
||||
the core driver lists/team.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="jdbccache"></a>
|
||||
<h2 class="underlined_10"><a href="http://jdbccache.projects.postgresql.org">Statement Caching Wrapper</a></h2>
|
||||
<div>
|
||||
<p>
|
||||
Wraps the core driver to enable caching of PreparedStatement
|
||||
objects. Not all application servers support this functionality
|
||||
in their connection pools and not all applications are deployed
|
||||
onto application servers.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
45
docs/about/license.html
Normal file
45
docs/about/license.html
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC License
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_about.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>BSD 2-clause "Simplified" License</h1>
|
||||
<p>
|
||||
The PostgreSQL JDBC Driver is distributed under the BSD-2-Clause License.
|
||||
The simplest explanation of the licensing terms is that
|
||||
you can do whatever you want with the product and source code as long
|
||||
as you don't claim you wrote it or sue us. You should give it a read
|
||||
though, it's only half a page.
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
<pre style="font-family: monospace,'Courier'; background-color: #f9f9f9; padding: 1em; border: 1px solid #ddd">
|
||||
Copyright (c) 1997, PostgreSQL Global Development Group
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.</pre>
|
||||
</div> <!-- pgContentWrap -->
|
25
docs/community/community.html
Normal file
25
docs/community/community.html
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Community
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_community.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Community</h1>
|
||||
<p>
|
||||
PostgreSQL is well supported by its active community. Current developments are chronicled
|
||||
in the <a href="http://www.postgresql.org/community/weeklynews" target="_blank">PostgreSQL Weekly News</a>
|
||||
and there are more than a dozen <a href="http://www.postgresql.org/community/lists" target="_blank">mailing lists</a>
|
||||
available, categorized into topics like administration, announcements,
|
||||
jobs, performance, and SQL.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The PostgreSQL JDBC Driver is a subset of the PostgreSQL database active community that
|
||||
strives to create a compliant Java interface for users. Please see the mailing list
|
||||
link or development menu for additional information regarding the community.
|
||||
</p>
|
||||
</div> <!-- pgContentWrap -->
|
196
docs/community/contributors.html
Normal file
196
docs/community/contributors.html
Normal file
@ -0,0 +1,196 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Contributors
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_community.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Contributors</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#maintainers">Maintainers</a></li>
|
||||
<li><a href="#authors">Previous Maintainers</a></li>
|
||||
<li><a href="#developers">Developers</a></li>
|
||||
<li><a href="#translators">Translators</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="maintainers"></a>
|
||||
<h2 class="underlined_10">Maintainers</h2>
|
||||
<div>
|
||||
<p>
|
||||
Please do not contact the maintainers directly unless you have
|
||||
a specific need to contact just them. Please use the
|
||||
<a href="mailinglist.html#general">pgsql-jdbc@postgresql.org</a>
|
||||
mailing list if at all possible.
|
||||
</p>
|
||||
<ul>
|
||||
<li>[davec] - Dave Cramer (pg.at.fastcrypt.com)</li>
|
||||
<li>[jurka] - Kris Jurka (jurka.at.ejurka.com)</li>
|
||||
<li>[oliver] - Oliver Jowett (oliver.at.opencloud.com)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="authors"></a>
|
||||
<h2 class="underlined_10">Previous Maintainers</h2>
|
||||
<div>
|
||||
<p>
|
||||
The original JDBC driver was written by Adrian Hall. Peter Mount
|
||||
and Barry Lind have maintained it in the past, but have
|
||||
since moved on to other things.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="developers"></a>
|
||||
<h2 class="underlined_10">Developers</h2>
|
||||
<div>
|
||||
<p>
|
||||
People who have contributed significant code to the project since
|
||||
the 7.4 release. A careful historical study has not been
|
||||
commissioned, but if you've done something valuable, we'd
|
||||
be happy to recognize you for it. Just let us know.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Jan Andre le Roux
|
||||
<ul>
|
||||
<li>ResultSetMetaData information based on the V3 protocol</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Jaroslaw J. Pyszny
|
||||
<ul>
|
||||
<li>Improve MetaData regarding the serial datatype</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Ulrich Meis
|
||||
<ul>
|
||||
<li>Allow users to customize the SSL connection</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Xavier Poinsard
|
||||
<ul>
|
||||
<li>Standard escaped functions {fn ...() }</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Oliver Siegmar
|
||||
<ul>
|
||||
<li>Support for infinity in the timestamp datatype</li>
|
||||
<li>Make PGInterval able to decode and manipulate interval data</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Michael Barker
|
||||
<ul>
|
||||
<li>Blob write and position methods.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Andras Kadinger
|
||||
<ul>
|
||||
<li>Support asynchronous notification retrieval.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Heikki Linnakangas
|
||||
<ul>
|
||||
<li>XADataSource implementation.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Luis Vilar Flores
|
||||
<ul>
|
||||
<li>Reduce memory usage retrieving bytea data.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Michael Paesold
|
||||
<ul>
|
||||
<li>Correctly parse dollar quotes and comments.</li>
|
||||
<li>Work with standard_conforming_strings = on.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mikko Tiihonen
|
||||
<ul>
|
||||
<li>Improve speed of parsing ResultSet data.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Marek Lewczuk
|
||||
<ul>
|
||||
<li>Support multi-dimensional arrays and NULL array elements.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="translators"></a>
|
||||
<h2 class="underlined_10">Translators</h2>
|
||||
<div>
|
||||
<ul>
|
||||
<li>cs - Czech
|
||||
<ul>
|
||||
<li>Petr Dittrich</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>de - German
|
||||
<ul>
|
||||
<li>Andre Bialojahn</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>es - Spanish
|
||||
<ul>
|
||||
<li>Diego A. Gil</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>fr - French
|
||||
<ul>
|
||||
<li>Xavier Poinsard</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>it - Italian
|
||||
<ul>
|
||||
<li>Giuseppe Sacco</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>pl - Polish
|
||||
<ul>
|
||||
<li>Jaroslaw Pyszny</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>pt_BR - Brazilian Portuguese
|
||||
<ul>
|
||||
<li>Euler Taveira de Oliveira</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>ru - Russian
|
||||
<ul>
|
||||
<li>Serguei Mokhov</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>sr - Serbian
|
||||
<ul>
|
||||
<li>Bojan Skaljac</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>tr - Turkish
|
||||
<ul>
|
||||
<li>Devrim Gunduz</li>
|
||||
<li>Nicolai Tufar</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>zh_CN - Simplified Chinese
|
||||
<ul>
|
||||
<li>Weiping</li>
|
||||
<li>Kuo ChaoYi</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>zh_TW - Traditional Chinese
|
||||
<ul>
|
||||
<li>Zhenbang Wei</li>
|
||||
<li>Kuo ChaoYi</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
89
docs/community/mailinglist.html
Normal file
89
docs/community/mailinglist.html
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Mailing List
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_community.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Mailing Lists</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#before">Before Mailing Anyone</a></li>
|
||||
<li><a href="#general">General List - pgsql-jdbc@postgresql.org</a></li>
|
||||
<li><a href="#commits">Commit Messages - jdbc-commits@pgfoundry.org</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="before"></a>
|
||||
<h2 class="underlined_10">Before Mailing Anyone</h2>
|
||||
<div>
|
||||
<p>
|
||||
Before posting a question or problem to the mailing list, please
|
||||
first look at the following resources:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="../documentation/faq.html">FAQ</a></li>
|
||||
<li><a href="../documentation/documentation.html">Documentation</a></li>
|
||||
<li>
|
||||
Mailing list <a href="http://archives.postgresql.org/pgsql-jdbc" target="_blank">archives</a>,
|
||||
(Google interface to <a href="http://groups.google.com/group/pgsql.interfaces.jdbc" target="_blank">newer messages</a>.)
|
||||
</li>
|
||||
<li>
|
||||
Consider upgrading your JDBC driver to the latest version. It
|
||||
should be backwards compatible and may fix your problem.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="general"></a>
|
||||
<h2 class="underlined_10">General List - pgsql-jdbc@postgresql.org</h2>
|
||||
<div>
|
||||
<p>
|
||||
This mailing list is for all PostgreSQL Java/JDBC related discussions.
|
||||
This is the place for bug reports, feature requests, help with
|
||||
problem solving, and pretty much anything involving Java and
|
||||
PostgreSQL. Messages from people who are not subscribed to the list
|
||||
will be held for moderator approval in an effort to cut down on spam.
|
||||
Archives and subscription information is available on the main
|
||||
<a href="http://archives.postgresql.org/pgsql-jdbc/" target="_blank">PostgreSQL site</a>.
|
||||
</p>
|
||||
<p>
|
||||
When asking for help or reporting a problem please try to include
|
||||
as much information as possible. Good things to note are:
|
||||
</p>
|
||||
<ul>
|
||||
<li>JDBC driver build number</li>
|
||||
<li>Server version</li>
|
||||
<li>Exact error message and stacktrace</li>
|
||||
<li>What you were doing, ideally in code form</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="commits"></a>
|
||||
<h2 class="underlined_10">Commit Messages - jdbc-commits@pgfoundry.org</h2>
|
||||
<div>
|
||||
<p>
|
||||
This mailing list is for people interested in carefully monitoring
|
||||
the development process. The mailing list was active until the code
|
||||
base was transferred to GitHub in late 2012. Every commit to this earlier
|
||||
CVS repository sent out an email with the log message and links to diffs.
|
||||
So the archive of this list, <a href="http://lists.pgfoundry.org/mailman/listinfo/jdbc-commits" target="_blank">pgfoundry site</a>,
|
||||
holds the history of activity with the driver prior to 2013.
|
||||
</p>
|
||||
<p>
|
||||
Currently activity on commits is best observed directly from the git
|
||||
repository hosted with <a href="https://github.com/pgjdbc/pgjdbc" target="_blank">GitHub</a>.
|
||||
The console tool, gitk, available with a git installation is an excellent
|
||||
GUI tool to observe commits.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
100
docs/development/development.html
Normal file
100
docs/development/development.html
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Development
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Development</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#About_the_Driver">About the Driver</a></li>
|
||||
<li><a href="#Tools">Tools</a></li>
|
||||
<li><a href="#Build_Process">Build Process</a></li>
|
||||
<li><a href="#Test_Suite">Test Suite</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="About_the_Driver"></a>
|
||||
<h2 class="underlined_10">About the Driver</h2>
|
||||
<div>
|
||||
<p>
|
||||
The PostgreSQL JDBC driver has some unique properties that you
|
||||
should be aware of before starting to develop any code for it.
|
||||
The current development driver supports eleven server versions and
|
||||
three java environments. This doesn't mean that every feature must
|
||||
work in every combination, but a reasonable behaviour must be
|
||||
provided for non-supported versions. While this extra compatibility
|
||||
sounds like a lot of work, the actual goal is to reduce the amount
|
||||
of work by maintaining only one code base.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="Tools"></a>
|
||||
<h2 class="underlined_10">Tools</h2>
|
||||
<div>
|
||||
<p>
|
||||
The following tools are required to build and test the driver:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="https://java.oracle.com" target="_blank">Java 6 Standard Edition Development Kit</a> At least JDK 1.6</li>
|
||||
<li><a href="https://maven.apache.org" target="_blank">Apache Maven</a> At least 3.1.1</li>
|
||||
<li><a href="https://git-scm.com" target="_blank">Git SCM</a></li>
|
||||
<li><a href="https://www.postgresql.org" target="_blank">A PostgreSQL instance</a> to run the tests.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="Build_Process"></a>
|
||||
<h2 class="underlined_10">Build Process</h2>
|
||||
<div>
|
||||
<p>
|
||||
After retrieving the source from the <a href="../development/git.html">git repository</a>.
|
||||
Move into the top level <span style="font-family: Courier New,Courier,monospace;">pgjdbc</span> directory and simply
|
||||
type <span style="font-family: Courier New,Courier,monospace;">mvn package -DskipTests</span>. This will build the appropriate driver for
|
||||
your current Java version and place it into <span style="font-family: Courier New,Courier,monospace;">target/postgresql-${version}.jar</span>.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="Test_Suite"></a>
|
||||
<h2 class="underlined_10">Test Suite</h2>
|
||||
<div>
|
||||
<p>
|
||||
To make sure the driver is working as expected there are a set of
|
||||
JUnit tests that should be run. These require a database to run
|
||||
against that has the plpgsql procedural language installed. The
|
||||
default parameters for username and database are "test", and for
|
||||
password it's "test".
|
||||
so a sample interaction to set this up would look the following, if
|
||||
you enter "password" when asked for it:
|
||||
</p>
|
||||
<pre style="font-family: serif;">
|
||||
postgres@host:~$ createuser -d -A test -P
|
||||
Enter password for user "test":
|
||||
Enter it again:
|
||||
CREATE USER
|
||||
|
||||
postgres@host:~$ createdb -U test test
|
||||
CREATE DATABASE
|
||||
|
||||
postgres@host:~$ createlang plpgsql test
|
||||
</pre>
|
||||
<p>
|
||||
Now we're ready to run the tests, we simply type <span style="font-family: Courier New,Courier,monospace;">mvn clean package</span>,
|
||||
and it should be off and running. To use non default values to run
|
||||
the regression tests, you can create a <span style="font-family: Courier New,Courier,monospace;">build.local.properties</span>
|
||||
in the top level directory. This properties file allows you to set
|
||||
values for host, database, user, password, and port with the standard
|
||||
properties "key = value" usage. The ability to set the port value
|
||||
makes it easy to run the tests against a number of different server
|
||||
versions on the same machine.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
44
docs/development/git.html
Normal file
44
docs/development/git.html
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC GIT
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>GIT Repository</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#webgit">GIT Web Interface</a></li>
|
||||
<li><a href="#newretrieve">Retrieving the Code</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="webgit"></a>
|
||||
<h2 class="underlined_10">GIT Web Interface</h2>
|
||||
<div>
|
||||
<p>
|
||||
A web view of the GIT repository is available
|
||||
<a href="https://github.com/pgjdbc/pgjdbc" target="_blank">here</a>.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="newretrieve"></a>
|
||||
<h2 class="underlined_10">Retrieving the Code</h2>
|
||||
<div>
|
||||
<p>
|
||||
Clone the PostgreSQL JDBC repository from Github:
|
||||
</p>
|
||||
<pre style="font-family: serif;">
|
||||
git clone git://github.com/pgjdbc/pgjdbc.git
|
||||
</pre>
|
||||
<p>
|
||||
This will create a subdirectory "pgjdbc" containing the driver source code.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
63
docs/development/status.html
Normal file
63
docs/development/status.html
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Translations Status
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Website</h1>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#v91">Branch - 91</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="v91"></a>
|
||||
<h2>Branch - 91</h2>
|
||||
<div>
|
||||
<table summary="" border="1" cellspacing="1" cellpadding="2">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>bg</th>
|
||||
<th>cs</th>
|
||||
<th>de</th>
|
||||
<th>es</th>
|
||||
<th>fr</th>
|
||||
<th>it</th>
|
||||
<th>ja</th>
|
||||
<th>nl</th>
|
||||
<th>pl</th>
|
||||
<th>pt_BR</th>
|
||||
<th>ru</th>
|
||||
<th>sr</th>
|
||||
<th>tr</th>
|
||||
<th>zh_CN</th>
|
||||
<th>zh_TW</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="po/91-messages.pot">Template</a><br>Messages: 224
|
||||
</td>
|
||||
<td><a href="po/91-bg.po">95</a></td>
|
||||
<td><a href="po/91-cs.po">42</a></td>
|
||||
<td><a href="po/91-de.po">74</a></td>
|
||||
<td><a href="po/91-es.po">9</a></td>
|
||||
<td><a href="po/91-fr.po">74</a></td>
|
||||
<td><a href="po/91-it.po">70</a></td>
|
||||
<td><a href="po/91-ja.po">97</a></td>
|
||||
<td><a href="po/91-nl.po">3</a></td>
|
||||
<td><a href="po/91-pl.po">32</a></td>
|
||||
<td><a href="po/91-pt_BR.po">82</a></td>
|
||||
<td><a href="po/91-ru.po">21</a></td>
|
||||
<td><a href="po/91-sr.po">82</a></td>
|
||||
<td><a href="po/91-tr.po">82</a></td>
|
||||
<td><a href="po/91-zh_CN.po">55</a></td>
|
||||
<td><a href="po/91-zh_TW.po">55</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
110
docs/development/todo.md
Normal file
110
docs/development/todo.md
Normal file
@ -0,0 +1,110 @@
|
||||
---
|
||||
layout: todos
|
||||
title: PostgreSQL JDBC Todo
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
|
||||
# Todo List
|
||||
***
|
||||
|
||||
* [Known Bugs](#Known_Bugs)
|
||||
* [Compliance](#Compliance)
|
||||
* [Performance](#Performance)
|
||||
* [PG Extensions](#PG_Extensions)
|
||||
* [Other](#Other)
|
||||
* [Ideas](#Ideas)
|
||||
* [Documentation](#Documentation)
|
||||
* [Website](#Website)
|
||||
|
||||
***
|
||||
<a name="Known_Bugs"></a>
|
||||
## Known Bugs
|
||||
|
||||
* **[bugs]** Deallocating large numbers of server side statements can break the
|
||||
connection by filling network buffers. This is a very, very low probability
|
||||
bug, but it is still possible. <a href="http://archives.postgresql.org/pgsql-jdbc/2004-12/msg00115.php">ref</a>
|
||||
→
|
||||
|
||||
***
|
||||
<a name="Compliance"></a>
|
||||
## Compliance
|
||||
|
||||
* **[JDBC1]** Implement Statement.setQueryTimeout. →
|
||||
* **[JDBC2]** Sort DatabaseMetaData.getTypeInfo properly (by closest match). →
|
||||
* **[JDBC2]** Implement SQLInput and SQLOutput to allow composite types to be used. →
|
||||
* **[JDBC3]** Implement Statement.getGeneratedKeys. <a href="http://archives.postgresql.org/pgsql-jdbc/2004-09/msg00190.php">ref2</a> →
|
||||
* **[JDBC3]** The JDBC 3 DatabaseMetaData methods sometimes return additional information.
|
||||
Currently we only return JDBC 2 data for these methods. <a href="http://archives.postgresql.org/pgsql-jdbc/2004-12/msg00038.php">ref</a>
|
||||
→
|
||||
* **[JDBC3]** Implement Clob write/position methods. →
|
||||
|
||||
***
|
||||
<a name="Performance"></a>
|
||||
## Performance
|
||||
|
||||
* **[]** Add statement pooling to take advantage of server prepared statements. →
|
||||
* **[]** Allow scrollable ResultSets to not fetch all results in one batch. →
|
||||
* **[]** Allow refcursor ResultSets to not fetch all results in one batch. →
|
||||
* **[]** Allow binary data transfers for all datatypes not just bytea. →
|
||||
|
||||
***
|
||||
<a name="PG_Extensions"></a>
|
||||
## PG Extensions
|
||||
|
||||
* **[]** Allow configuration of GUC parameters via the Connection URL or Datasource.
|
||||
The most obvious example of usefulness is search_path. <a href="http://archives.postgresql.org/pgsql-jdbc/2004-02/msg00022.php">ref</a>
|
||||
→
|
||||
|
||||
***
|
||||
<a name="Other"></a>
|
||||
## Other
|
||||
|
||||
* **[test]** Pass the JDBC CTS (Sun's test suite). →
|
||||
* **[code]** Allow SSL to use client certificates. This can probably be done with
|
||||
our existing SSLSocketFactory customization code, but it would be good to
|
||||
provide an example or other wrapper so a non-expert can set it up.
|
||||
<a href="http://archives.postgresql.org/pgsql-jdbc/2004-12/msg00077.php">ref1</a>,
|
||||
<a href="http://archives.postgresql.org/pgsql-jdbc/2004-12/msg00083.php">ref2</a> →
|
||||
* **[code]** Currently the internal type cache is not schema aware. →
|
||||
* **[code]** Need a much better lexer/parser than the ad hoc stuff in the driver.
|
||||
<a href="http://archives.postgresql.org/pgsql-jdbc/2004-09/msg00062.php">ref2</a> →
|
||||
|
||||
***
|
||||
<a name="Ideas"></a>
|
||||
## Ideas
|
||||
|
||||
* **[]** Allow Blob/Clob to operate on bytea/text data. <a href="http://archives.postgresql.org/pgsql-jdbc/2005-01/msg00058.php">ref</a>
|
||||
→
|
||||
* **[]** Allow getByte/getInt/... to work on boolean values <a href="http://archives.postgresql.org/pgsql-jdbc/2005-01/msg00254.php">ref</a>
|
||||
→
|
||||
* **[]** Add a URL parameter to make the driver not force a rollback on error for
|
||||
compatibility with other dbs. The driver can wrap each statement in a Savepoint.
|
||||
<a href="http://archives.postgresql.org/pgsql-jdbc/2005-01/msg00131.php">ref</a> →
|
||||
* **[]** Combine DatabaseMetaData efforts with pl/java. <a href="http://archives.postgresql.org/pgsql-jdbc/2005-02/msg00063.php">ref</a>
|
||||
→
|
||||
* **[]** ResultSetMetaData calls that run queries are cached on a per column basis, but
|
||||
it seems likely that they're going to be called for all columns, so try to issue
|
||||
one query per ResultSet, not per column. →
|
||||
* **[]** Make PGConnection, PGStatement, ... extend java.sql.XXX <a href="http://archives.postgresql.org/pgsql-jdbc/2005-01/msg00223.php">ref</a>
|
||||
→
|
||||
|
||||
***
|
||||
<a name="Documentation"></a>
|
||||
## Documentation
|
||||
|
||||
* **[]** The PGResultSetMetaData interface is not mentioned. →
|
||||
* **[]** Timestamp +/- Infinity values are not mentioned. →
|
||||
* **[]** Async notifies are more async now. <a href="http://archives.postgresql.org/pgsql-jdbc/2005-04/msg00056.php">ref</a>
|
||||
→
|
||||
|
||||
***
|
||||
<a name="Website"></a>
|
||||
## Website
|
||||
|
||||
* **[]** Setup a cron job somewhere to build and deploy the sight on a daily
|
||||
basis to keep API changes and translations up to date.
|
||||
→
|
||||
* **[]** Add a daily git snapshot build to make the latest updates available.
|
||||
→
|
132
docs/development/translations.html
Normal file
132
docs/development/translations.html
Normal file
@ -0,0 +1,132 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Translations
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Translations</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#devlopers">Developers</a></li>
|
||||
<li><a href="#translators">Translators</a></li>
|
||||
<li><a href="#maintainers">Maintainers</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="overview"></a>
|
||||
<h2 class="underlined_10">Overview</h2>
|
||||
<div>
|
||||
<p>
|
||||
Translations of driver specific error messages are available in a
|
||||
number of languages. The following information is about how to
|
||||
update an existing translation or to provide a translation to a new
|
||||
language.
|
||||
</p>
|
||||
<p>
|
||||
The translations are done using the
|
||||
<a href="http://www.gnu.org/software/gettext/gettext.html" target="_blank">GNU gettext</a>
|
||||
tools. These are not required to build or use the driver, only
|
||||
translators and maintainers need them.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="devlopers"></a>
|
||||
<h2 class="underlined_10">Developers</h2>
|
||||
<div>
|
||||
<p>
|
||||
When writing code for the driver you need to specially mark strings
|
||||
for translation so they are picked up by the tools. In general any
|
||||
user visible message should be made available for translation.
|
||||
Strings are marked using the <a href="privateapi/org/postgresql/util/GT.html">GT.tr</a>
|
||||
method. The name means "gettext translate", but
|
||||
a shorter name was wanted because this shows up in a lot of places.
|
||||
</p>
|
||||
<p>
|
||||
To provide context sensitive information the standard Java
|
||||
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html" target="_blank">MessageFormat</a>
|
||||
syntax is used in the error messages. Consider, for example,
|
||||
the error message for calling ResultSet.getInt() with an invalid
|
||||
column number, we want to helpfully report the column asked for and
|
||||
the number of columns in the ResultSet.
|
||||
</p>
|
||||
<pre style="font-family: serif;">
|
||||
if (column < 1 || column > fields.length) {
|
||||
String err = GT.tr(
|
||||
"The column index requested: {0} is out of range.",
|
||||
new Integer(column)
|
||||
);
|
||||
throw new PSQLException(err, PSQLState.INVALID_PARAMETER_VALID);
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="translators"></a>
|
||||
<h2 class="underlined_10">Translators</h2>
|
||||
<div>
|
||||
<p>
|
||||
Check the current <a href="status.html">translation status</a>
|
||||
page to see if an existing translation exists for your language,
|
||||
so you can update that instead of starting from
|
||||
scratch. To start a new translation you can download the template
|
||||
file and work on that instead.
|
||||
</p>
|
||||
<p>
|
||||
Editing the .po file is a pretty straightforward process and a number
|
||||
of tools exist to aid you in the process:
|
||||
</p>
|
||||
<ul>
|
||||
<li>GNU Emacs and XEmacs have PO editing modes.</li>
|
||||
<li>
|
||||
<a href="http://freecode.com/projects/kbabel" target="_blank">KBabel</a>
|
||||
is a KDE-based editing tool.
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://poedit.sourceforge.net/" target="_blank">poEdit</a>
|
||||
is another tool which can run on Windows.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Once you feel the translation is accurate and complete (or you get
|
||||
tired), verify that the file by running <span class="codefrag">msgfmt</span>.
|
||||
</p>
|
||||
<pre style="font-family: serif;">
|
||||
msgfmt -c -v -o /dev/null pofile
|
||||
</pre>
|
||||
<p>
|
||||
If everything checks out send the po file on over to the
|
||||
<a href="mailto:pgsql-jdbc@postgresql.org">pgsql-jdbc@postgresql.org</a>
|
||||
mailing list. This list does have a size limit of 30k, so you will
|
||||
need to compress the po file before sending it.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="maintainers"></a>
|
||||
<h2 class="underlined_10">Maintainers</h2>
|
||||
<div>
|
||||
<p>
|
||||
To avoid requiring the gettext tools to compile the driver the
|
||||
decision has been made to directly check in the compiled message
|
||||
catalogs to the git repository. When you get a new or updated
|
||||
translation, first ensure that it is valid by running the
|
||||
<span style="font-family: Courier New,Courier,monospace;">msgfmt</span> command mentioned in the translators section.
|
||||
If this looks correct drop it into the
|
||||
<span style="font-family: Courier New,Courier,monospace;">src/org/postgresql/translation</span>
|
||||
directory and run the <span class="codefrag">update-translations.sh</span> script
|
||||
in the top level directory. This will produce the compiled class
|
||||
file that contains the translated messages. Then simply check in
|
||||
both the .po and .class files. Be sure to only commit changes to the
|
||||
translations you've modified because the <span style="font-family: Courier New,Courier,monospace;">update-translations.sh</span>
|
||||
script modifies all the translations.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
66
docs/development/website.html
Normal file
66
docs/development/website.html
Normal file
@ -0,0 +1,66 @@
|
||||
---
|
||||
layout: default
|
||||
title: PostgreSQL JDBC Website
|
||||
resource: ../media
|
||||
nav: ../
|
||||
---
|
||||
|
||||
{% include submenu_development.html %}
|
||||
|
||||
<div id="pgContentWrap">
|
||||
<h1>Website</h1>
|
||||
<hr />
|
||||
<div>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="#website">Building the Website</a></li>
|
||||
<li><a href="#addingpages">Adding a Page</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="website"></a>
|
||||
<h2 class="underlined_10">Building the Website</h2>
|
||||
<div>
|
||||
<p>
|
||||
The website is produced with <a href="http://jekyllrb.com" target="_blank">Jekyll</a>.
|
||||
It allows you to build a reasonably good looking website that is
|
||||
easy to maintain and modular in nature. Templates are used from the _layout
|
||||
and _includes directories which are then used in conjunction with content that
|
||||
is created with <a href="http://daringfireball.net/projects/markdown/" target="_blank">Markdown</a>,
|
||||
<a href="http://textile.sitemonks.com/" target="_blank">Textile</a>, or
|
||||
just standard HTML for input. Using Markdown or Textile allows the content
|
||||
to be generated with simple rules that allow a more free flowing process of
|
||||
writing without worrying about coding for the HTML.
|
||||
</p>
|
||||
<p>
|
||||
To get started please read the <a href="http://jekyllrb.com" target="_blank">Jekyll website</a>
|
||||
for installation instructions for that tool. After installing Jekyll you need to get
|
||||
the website project. This is available from the same <a href="../development/git.html">git repository</a>
|
||||
that the main source code is, it's just a different module, <span style="font-family: Courier New,Courier,monospace;">www</span>.
|
||||
Checkout this module and then within the top level directory of the module simply
|
||||
run <span style="font-family: Courier New,Courier,monospace;">jekyll build</span>.
|
||||
This should produce the website in the <span style="font-family: Courier New,Courier,monospace;">_site</span>
|
||||
subdirectory.
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<a name="addingpages"></a>
|
||||
<h2 class="underlined_10">Adding a Page</h2>
|
||||
<div>
|
||||
<p>
|
||||
To add a page the easiest thing to do is copy an existing one from the site like
|
||||
<span style="font-family: Courier New,Courier,monospace;">about/about.html</span>
|
||||
and then rip out its contents. Once new content is created and you have saved
|
||||
the new page you will need to add the new file to the menu system
|
||||
of the appropriate <span style="font-family: Courier New,Courier,monospace;">_includes</span>
|
||||
subdirectory submenu.<br><br>
|
||||
|
||||
A good place to look for example content is <a href="https://github.com/mojombo/jekyll/wiki/sites">Jekyll's wiki</a>
|
||||
site where there is a listing of real sites that use Jekyll. Many of these sites will
|
||||
have their repositories available for review.
|
||||
</p>
|
||||
</div>
|
||||
</div> <!-- pgContentWrap -->
|
179
docs/documentation/92/binary-data.md
Normal file
179
docs/documentation/92/binary-data.md
Normal file
@ -0,0 +1,179 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 7. Storing Binary Data
|
||||
header: Chapter 7. Storing Binary Data
|
||||
resource: media
|
||||
previoustitle: Chapter 6. Calling Stored Functions
|
||||
previous: callproc.html
|
||||
nexttitle: Chapter 8. JDBC escapes
|
||||
next: escapes.html
|
||||
---
|
||||
|
||||
PostgreSQL™ provides two distinct ways to store binary data. Binary data can be
|
||||
stored in a table using the data type BYTEA or by using the Large Object feature
|
||||
which stores the binary data in a separate table in a special format and refers
|
||||
to that table by storing a value of type OID in your table.
|
||||
|
||||
In order to determine which method is appropriate you need to understand the
|
||||
limitations of each method. The BYTEA data type is not well suited for storing
|
||||
very large amounts of binary data. While a column of type BYTEA can hold up to
|
||||
1 GB of binary data, it would require a huge amount of memory to process such a
|
||||
large value. The Large Object method for storing binary data is better suited to
|
||||
storing very large values, but it has its own limitations. Specifically deleting
|
||||
a row that contains a Large Object reference does not delete the Large Object.
|
||||
Deleting the Large Object is a separate operation that needs to be performed.
|
||||
Large Objects also have some security issues since anyone connected to the
|
||||
database can view and/or modify any Large Object, even if they don't have
|
||||
permissions to view/update the row containing the Large Object reference.
|
||||
|
||||
Version 7.2 was the first release of the JDBC driver that supports the BYTEA
|
||||
data type. The introduction of this functionality in 7.2 has introduced a change
|
||||
in behavior as compared to previous releases. Since 7.2, the methods `getBytes()`,
|
||||
`setBytes()`, `getBinaryStream()`, and `setBinaryStream()` operate on the BYTEA
|
||||
data type. In 7.1 and earlier, these methods operated on the OID data type
|
||||
associated with Large Objects. It is possible to revert the driver back to the
|
||||
old 7.1 behavior by setting the property `compatible` on the `Connection` object
|
||||
to the value `7.1`. More details on connection properties are available in the
|
||||
section called [“Connection Parameters”](connect.html#connection-parameters).
|
||||
|
||||
To use the BYTEA data type you should simply use the `getBytes()`, `setBytes()`,
|
||||
`getBinaryStream()`, or `setBinaryStream()` methods.
|
||||
|
||||
To use the Large Object functionality you can use either the `LargeObject` class
|
||||
provided by the PostgreSQL™ JDBC driver, or by using the `getBLOB()` and `setBLOB()`
|
||||
methods.
|
||||
|
||||
### Important
|
||||
|
||||
> You must access Large Objects within an SQL transaction block. You can start a
|
||||
transaction block by calling `setAutoCommit(false)`.
|
||||
|
||||
[Example 7.1, “Processing Binary Data in JDBC”](binary-data.html#binary-data-example)
|
||||
contains some examples on how to process binary data using the PostgreSQL™ JDBC
|
||||
driver.
|
||||
|
||||
<a name="binary-data-example"></a>
|
||||
***Example 7.1. Processing Binary Data in JDBC***
|
||||
|
||||
For example, suppose you have a table containing the file names of images and you
|
||||
also want to store the image in a BYTEA column:
|
||||
|
||||
`CREATE TABLE images (imgname text, img bytea);`
|
||||
|
||||
To insert an image, you would use:
|
||||
|
||||
`File file = new File("myimage.gif");`
|
||||
`FileInputStream fis = new FileInputStream(file);`
|
||||
`PreparedStatement ps = conn.prepareStatement("INSERT INTO images VALUES (?, ?)");`
|
||||
`ps.setString(1, file.getName());`
|
||||
`ps.setBinaryStream(2, fis, (int)file.length());`
|
||||
`ps.executeUpdate();`
|
||||
`ps.close();`
|
||||
`fis.close();`
|
||||
|
||||
Here, `setBinaryStream()` transfers a set number of bytes from a stream into the
|
||||
column of type BYTEA. This also could have been done using the `setBytes()` method
|
||||
if the contents of the image was already in a `byte[]`.
|
||||
|
||||
### Note
|
||||
|
||||
> The length parameter to `setBinaryStream` must be correct. There is no way to
|
||||
indicate that the stream is of unknown length. If you are in this situation, you
|
||||
must read the stream yourself into temporary storage and determine the length.
|
||||
Now with the correct length you may send the data from temporary storage on to
|
||||
the driver.
|
||||
|
||||
Retrieving an image is even easier. (We use `PreparedStatement` here, but the
|
||||
`Statement` class can equally be used.)
|
||||
|
||||
`PreparedStatement ps = conn.prepareStatement("SELECT img FROM images WHERE imgname = ?");`
|
||||
`ps.setString(1, "myimage.gif");`
|
||||
`ResultSet rs = ps.executeQuery();`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`byte[] imgBytes = rs.getBytes(1);`
|
||||
`// use the data in some way here`
|
||||
`}`
|
||||
`rs.close();`
|
||||
`ps.close();`
|
||||
|
||||
Here the binary data was retrieved as an `byte[]`. You could have used a
|
||||
`InputStream` object instead.
|
||||
|
||||
Alternatively you could be storing a very large file and want to use the
|
||||
`LargeObject` API to store the file:
|
||||
|
||||
`CREATE TABLE imageslo (imgname text, imgoid oid);`
|
||||
|
||||
To insert an image, you would use:
|
||||
|
||||
|
||||
`// All LargeObject API calls must be within a transaction block`
|
||||
`conn.setAutoCommit(false);``<br />
|
||||
|
||||
`// Get the Large Object Manager to perform operations with`
|
||||
`LargeObjectManager lobj = conn.unwrap(org.postgresql.PGConnection.class).getLargeObjectAPI();`<br />
|
||||
|
||||
`// Create a new large object`
|
||||
`long oid = lobj.createLO(LargeObjectManager.READ | LargeObjectManager.WRITE);`<br />
|
||||
|
||||
`// Open the large object for writing`
|
||||
`LargeObject obj = lobj.open(oid, LargeObjectManager.WRITE);`<br />
|
||||
|
||||
`// Now open the file`
|
||||
`File file = new File("myimage.gif");`
|
||||
`FileInputStream fis = new FileInputStream(file);`<br />
|
||||
|
||||
`// Copy the data from the file to the large object`
|
||||
`byte buf[] = new byte[2048];`
|
||||
`int s, tl = 0;`
|
||||
`while ((s = fis.read(buf, 0, 2048)) > 0)`
|
||||
`{`
|
||||
`obj.write(buf, 0, s);`
|
||||
`tl += s;`
|
||||
`}`<br />
|
||||
|
||||
`// Close the large object`
|
||||
`obj.close();`<br />
|
||||
|
||||
`// Now insert the row into imageslo`
|
||||
`PreparedStatement ps = conn.prepareStatement("INSERT INTO imageslo VALUES (?, ?)");`
|
||||
`ps.setString(1, file.getName());`
|
||||
`ps.setLong(2, oid);`
|
||||
`ps.executeUpdate();`
|
||||
`ps.close();`
|
||||
`fis.close();`<br />
|
||||
|
||||
`// Finally, commit the transaction.`
|
||||
`conn.commit();`
|
||||
|
||||
Retrieving the image from the Large Object:
|
||||
|
||||
`// All LargeObject API calls must be within a transaction block`
|
||||
`conn.setAutoCommit(false);`<br />
|
||||
|
||||
`// Get the Large Object Manager to perform operations with`
|
||||
`LargeObjectManager lobj = conn.unwrap(org.postgresql.PGConnection.class).getLargeObjectAPI();`<br />
|
||||
|
||||
`PreparedStatement ps = conn.prepareStatement("SELECT imgoid FROM imageslo WHERE imgname = ?");`
|
||||
`ps.setString(1, "myimage.gif");`
|
||||
`ResultSet rs = ps.executeQuery();`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`// Open the large object for reading`
|
||||
`long oid = rs.getLong(1);`
|
||||
`LargeObject obj = lobj.open(oid, LargeObjectManager.READ);`<br />
|
||||
|
||||
`// Read the data`
|
||||
`byte buf[] = new byte[obj.size()];`
|
||||
`obj.read(buf, 0, obj.size());`
|
||||
`// Do something with the data read here`<br />
|
||||
|
||||
`// Close the object`
|
||||
`obj.close();`
|
||||
`}`
|
||||
`rs.close();`
|
||||
`ps.close();`<br />
|
||||
|
||||
`// Finally, commit the transaction.`
|
||||
`conn.commit();`
|
116
docs/documentation/92/callproc.md
Normal file
116
docs/documentation/92/callproc.md
Normal file
@ -0,0 +1,116 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 6. Calling Stored Functions
|
||||
header: Chapter 6. Calling Stored Functions
|
||||
resource: media
|
||||
previoustitle: Creating and Modifying Database Objects
|
||||
previous: ddl.html
|
||||
nexttitle: Chapter 7. Storing Binary Data
|
||||
next: binary-data.html
|
||||
---
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
* [Obtaining a `ResultSet` from a stored function](callproc.html#callproc-resultset)
|
||||
* [From a Function Returning `SETOF` type](callproc.html#callproc-resultset-setof)
|
||||
* [From a Function Returning a refcursor](callproc.html#callproc-resultset-refcursor)
|
||||
|
||||
<a name="call-function-example"></a>
|
||||
**Example 6.1. Calling a built in stored function**
|
||||
|
||||
This example shows how to call a PostgreSQL™ built in function, `upper`, which
|
||||
simply converts the supplied string argument to uppercase.
|
||||
|
||||
`CallableStatement upperProc = conn.prepareCall("{ ? = call upper( ? ) }");`
|
||||
`upperProc.registerOutParameter(1, Types.VARCHAR);`
|
||||
`upperProc.setString(2, "lowercase to uppercase");`
|
||||
`upperProc.execute();`
|
||||
`String upperCased = upperProc.getString(1);`
|
||||
`upperProc.close();`
|
||||
|
||||
<a name="callproc-resultset"></a>
|
||||
# Obtaining a `ResultSet` from a stored function
|
||||
|
||||
PostgreSQL's™ stored functions can return results in two different ways. The
|
||||
function may return either a refcursor value or a `SETOF` some datatype. Depending
|
||||
on which of these return methods are used determines how the function should be
|
||||
called.
|
||||
|
||||
<a name="callproc-resultset-setof"></a>
|
||||
## From a Function Returning `SETOF` type
|
||||
|
||||
Functions that return data as a set should not be called via the `CallableStatement`
|
||||
interface, but instead should use the normal `Statement` or `PreparedStatement`
|
||||
interfaces.
|
||||
|
||||
<a name="setof-resultset"></a>
|
||||
**Example 6.2. Getting `SETOF` type values from a function**
|
||||
|
||||
`Statement stmt = conn.createStatement();`
|
||||
`stmt.execute("CREATE OR REPLACE FUNCTION setoffunc() RETURNS SETOF int AS "`
|
||||
`+ "' SELECT 1 UNION SELECT 2;' LANGUAGE sql");`
|
||||
`ResultSet rs = stmt.executeQuery("SELECT * FROM setoffunc()");`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`// do something`
|
||||
`}`
|
||||
`rs.close();`
|
||||
`stmt.close();`
|
||||
|
||||
<a name="callproc-resultset-refcursor"></a>
|
||||
## From a Function Returning a refcursor
|
||||
|
||||
When calling a function that returns a refcursor you must cast the return type of
|
||||
`getObject` to a `ResultSet`
|
||||
|
||||
### Note
|
||||
|
||||
> One notable limitation of the current support for a `ResultSet` created from
|
||||
a refcursor is that even though it is a cursor backed `ResultSet`, all data will
|
||||
be retrieved and cached on the client. The `Statement` fetch size parameter
|
||||
described in the section called [“Getting results based on a cursor”](query.html#query-with-cursor)
|
||||
is ignored. This limitation is a deficiency of the JDBC driver, not the server,
|
||||
and it is technically possible to remove it, we just haven't found the time.
|
||||
|
||||
<a name="get-refcursor-from-function-call"></a>
|
||||
**Example 6.3. Getting refcursor Value From a Function**
|
||||
|
||||
`// Setup function to call.`
|
||||
`Statement stmt = conn.createStatement();`
|
||||
`stmt.execute("CREATE OR REPLACE FUNCTION refcursorfunc() RETURNS refcursor AS '"`
|
||||
`+ " DECLARE "`
|
||||
`+ " mycurs refcursor; "`
|
||||
`+ " BEGIN "`
|
||||
`+ " OPEN mycurs FOR SELECT 1 UNION SELECT 2; "`
|
||||
`+ " RETURN mycurs; "`
|
||||
`+ " END;' language plpgsql");`
|
||||
`stmt.close();`<br />
|
||||
|
||||
`// We must be inside a transaction for cursors to work.`
|
||||
`conn.setAutoCommit(false);`<br />
|
||||
|
||||
`// Procedure call.`
|
||||
`CallableStatement proc = conn.prepareCall("{ ? = call refcursorfunc() }");`
|
||||
`proc.registerOutParameter(1, Types.OTHER);`
|
||||
`proc.execute();`
|
||||
`ResultSet results = (ResultSet) proc.getObject(1);`
|
||||
`while (results.next())`
|
||||
`{`
|
||||
`// do something with the results.`
|
||||
`}`
|
||||
`results.close();`
|
||||
`proc.close();`
|
||||
|
||||
It is also possible to treat the refcursor return value as a cursor name directly.
|
||||
To do this, use the `getString` of `ResultSet`. With the underlying cursor name,
|
||||
you are free to directly use cursor commands on it, such as `FETCH` and `MOVE`.
|
||||
|
||||
<a name="refcursor-string-example"></a>
|
||||
**Example 6.4. Treating refcursor as a cursor name**
|
||||
|
||||
`conn.setAutoCommit(false);`
|
||||
`CallableStatement proc = conn.prepareCall("{ ? = call refcursorfunc() }");`
|
||||
`proc.registerOutParameter(1, Types.OTHER);`
|
||||
`proc.execute();`
|
||||
`String cursorName = proc.getString(1);`
|
||||
`proc.close();`
|
26
docs/documentation/92/classpath.md
Normal file
26
docs/documentation/92/classpath.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Setting up the Class Path
|
||||
header: Chapter 2. Setting up the JDBC Driver
|
||||
resource: media
|
||||
previoustitle: Chapter 2. Setting up the JDBC Driver
|
||||
previous: setup.html
|
||||
nexttitle: Preparing the Database Server for JDBC
|
||||
next: prepare.html
|
||||
---
|
||||
|
||||
To use the driver, the JAR archive named `postgresql.jar` if you built from source,
|
||||
otherwise it will likely be (named with the following convention: `postgresql-*[server version]*.*[build number]*.jdbc*[JDBC version]*.jar`,
|
||||
for example `postgresql-8.0-310.jdbc3.jar`) needs to be included in the class path,
|
||||
either by putting it in the `CLASSPATH` environment variable, or by using flags on
|
||||
the **java** command line.
|
||||
|
||||
For instance, assume we have an application that uses the JDBC driver to access
|
||||
a database, and that application is installed as `/usr/local/lib/myapp.jar`. The
|
||||
PostgreSQL™ JDBC driver installed as `/usr/local/pgsql/share/java/postgresql.jar`.
|
||||
To run the application, we would use:
|
||||
|
||||
*export CLASSPATH=/usr/local/lib/myapp.jar:/usr/local/pgsql/share/java/postgresql.jar:*.
|
||||
*java MyApp*
|
||||
|
||||
Loading the driver from within the application is covered in [Chapter 3, Initializing the Driver](use.html).
|
234
docs/documentation/92/connect.md
Normal file
234
docs/documentation/92/connect.md
Normal file
@ -0,0 +1,234 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Connecting to the Database
|
||||
header: Chapter 3. Initializing the Driver
|
||||
resource: media
|
||||
previoustitle: Loading the Driver
|
||||
previous: load.html
|
||||
nexttitle: Chapter 4. Using SSL
|
||||
next: ssl.html
|
||||
---
|
||||
|
||||
With JDBC, a database is represented by a URL (Uniform Resource Locator). With
|
||||
PostgreSQL™, this takes one of the following forms:
|
||||
|
||||
* jdbc:postgresql:*`database`*
|
||||
* jdbc:postgresql:/
|
||||
* jdbc:postgresql://*`host/database`*
|
||||
* jdbc:postgresql://*`host/`*
|
||||
* jdbc:postgresql://*`host:port/database`*
|
||||
* jdbc:postgresql://*`host:port/`*
|
||||
|
||||
The parameters have the following meanings:
|
||||
|
||||
* *`host`*
|
||||
|
||||
The host name of the server. Defaults to `localhost`. To specify an IPv6
|
||||
address your must enclose the `host` parameter with square brackets, for
|
||||
example:
|
||||
|
||||
jdbc:postgresql://[::1]:5740/accounting
|
||||
|
||||
* *`port`*
|
||||
|
||||
The port number the server is listening on. Defaults to the PostgreSQL™
|
||||
standard port number (5432).
|
||||
|
||||
* *`database`*
|
||||
|
||||
The database name. The default is to connect to a database with the same name
|
||||
as the user name.
|
||||
|
||||
To connect, you need to get a `Connection` instance from JDBC. To do this, you use
|
||||
the `DriverManager.getConnection()` method:
|
||||
|
||||
`Connection db = DriverManager.getConnection(url, username, password)`;
|
||||
|
||||
<a name="connection-parameters"></a>
|
||||
## Connection Parameters
|
||||
|
||||
In addition to the standard connection parameters the driver supports a number
|
||||
of additional properties which can be used to specify additional driver behaviour
|
||||
specific to PostgreSQL™. These properties may be specified in either the connection
|
||||
URL or an additional `Properties` object parameter to `DriverManager.getConnection`.
|
||||
The following examples illustrate the use of both methods to establish a SSL
|
||||
connection.
|
||||
|
||||
`String url = "jdbc:postgresql://localhost/test";`
|
||||
`Properties props = new Properties();`
|
||||
`props.setProperty("user","fred");`
|
||||
`props.setProperty("password","secret");`
|
||||
`props.setProperty("ssl","true");`
|
||||
`Connection conn = DriverManager.getConnection(url, props);`
|
||||
|
||||
`String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true";`
|
||||
`Connection conn = DriverManager.getConnection(url);`
|
||||
|
||||
* `user = String`
|
||||
|
||||
The database user on whose behalf the connection is being made.
|
||||
|
||||
* `password = String`
|
||||
|
||||
The database user's password.
|
||||
|
||||
* `ssl`
|
||||
|
||||
Connect using SSL. The driver must have been compiled with SSL support.
|
||||
This property does not need a value associated with it. The mere presence
|
||||
of it specifies a SSL connection. However, for compatibility with future
|
||||
versions, the value "true" is preferred. For more information see [Chapter
|
||||
4, *Using SSL*](ssl.html).
|
||||
|
||||
* `sslfactory = String`
|
||||
|
||||
The provided value is a class name to use as the `SSLSocketFactory` when
|
||||
establishing a SSL connection. For more information see the section
|
||||
called [“Custom SSLSocketFactory”](ssl-factory.html).
|
||||
|
||||
* `sslfactoryarg = String`
|
||||
|
||||
This value is an optional argument to the constructor of the sslfactory
|
||||
class provided above. For more information see the section called [“Custom SSLSocketFactory”](ssl-factory.html).
|
||||
|
||||
* `compatible = String`
|
||||
|
||||
Act like an older version of the driver to retain compatibility with older
|
||||
applications. At the moment this controls two driver behaviours: the
|
||||
handling of binary data fields, and the handling of parameters set via
|
||||
`setString()`.
|
||||
|
||||
Older versions of the driver used this property to also control the
|
||||
protocol used to connect to the backend. This is now controlled by the
|
||||
`protocolVersion` property.
|
||||
|
||||
Information on binary data handling is detailed in [Chapter 7, Storing Binary Data](binary-data.html).
|
||||
To force the use of Large Objects set the compatible property to 7.1.
|
||||
|
||||
When `compatible` is set to 7.4 or below, the default for the `stringtype`
|
||||
parameter is changed to `unspecified`.
|
||||
|
||||
* `sendBufferSize = int`
|
||||
Sets SO_SNDBUF on the connection stream
|
||||
|
||||
* `recvBufferSize = int`
|
||||
Sets SO_RCVBUF on the connection stream
|
||||
|
||||
* `protocolVersion = String`
|
||||
|
||||
The driver supports both the V2 and V3 frontend/backend protocols. The
|
||||
V3 protocol was introduced in 7.4 and the driver will by default try to
|
||||
connect using the V3 protocol, if that fails it will fall back to the V2
|
||||
protocol. If the protocolVersion property is specified, the driver will
|
||||
try only the specified protocol (which should be either "2" or "3").
|
||||
Setting protocolVersion to "2" may be used to avoid the failed attempt
|
||||
to use the V3 protocol when connecting to a version 7.3 or earlier server,
|
||||
or to force the driver to use the V2 protocol despite connecting to a 7.4
|
||||
or greater server.
|
||||
|
||||
* `loglevel = int`
|
||||
|
||||
Set the amount of logging information printed to the DriverManager's
|
||||
current value for LogStream or LogWriter. It currently supports values
|
||||
of `org.postgresql.Driver.DEBUG` (2) and `org.postgresql.Driver.INFO` (1).
|
||||
`INFO` will log very little information while `DEBUG` will produce significant
|
||||
detail. This property is only really useful if you are a developer or
|
||||
are having problems with the driver.
|
||||
|
||||
* `charSet = String`
|
||||
|
||||
The character set to use for data sent to the database or received from
|
||||
the database. This property is only relevant for server versions less
|
||||
than or equal to 7.2. The 7.3 release was the first with multibyte support
|
||||
compiled by default and the driver uses its character set translation
|
||||
facilities instead of trying to do it itself.
|
||||
|
||||
* `allowEncodingChanges = boolean`
|
||||
|
||||
When using the V3 protocol the driver monitors changes in certain server
|
||||
configuration parameters that should not be touched by end users. The
|
||||
`client_encoding` setting is set by the driver and should not be altered.
|
||||
If the driver detects a change it will abort the connection. There is
|
||||
one legitimate exception to this behaviour though, using the `COPY` command
|
||||
on a file residing on the server's filesystem. The only means of specifying
|
||||
the encoding of this file is by altering the `client_encoding` setting.
|
||||
The JDBC team considers this a failing of the `COPY` command and hopes to
|
||||
provide an alternate means of specifying the encoding in the future, but
|
||||
for now there is this URL parameter. Enable this only if you need to
|
||||
override the client encoding when doing a copy.
|
||||
|
||||
* `logUnclosedConnections = boolean`
|
||||
|
||||
Clients may leak `Connection` objects by failing to call its `close()`
|
||||
method. Eventually these objects will be garbage collected and the
|
||||
`finalize()` method will be called which will close the `Connection` if
|
||||
caller has neglected to do this himself. The usage of a finalizer is just
|
||||
a stopgap solution. To help developers detect and correct the source of
|
||||
these leaks the `logUnclosedConnections` URL parameter has been added.
|
||||
It captures a stacktrace at each `Connection` opening and if the `finalize()`
|
||||
method is reached without having been closed the stacktrace is printed
|
||||
to the log.
|
||||
|
||||
* `prepareThreshold = int`
|
||||
|
||||
Determine the number of `PreparedStatement` executions required before
|
||||
switching over to use server side prepared statements. The default is
|
||||
five, meaning start using server side prepared statements on the fifth
|
||||
execution of the same `PreparedStatement` object. More information on
|
||||
server side prepared statements is available in the section called
|
||||
[“Server Prepared Statements”](server-prepare.html).
|
||||
|
||||
* `loginTimeout = int`
|
||||
|
||||
Specify how long to wait for establishment of a database connection. The
|
||||
timeout is specified in seconds.
|
||||
|
||||
* `socketTimeout = int`
|
||||
|
||||
The timeout value used for socket read operations. If reading from the
|
||||
server takes longer than this value, the connection is closed. This can
|
||||
be used as both a brute force global query timeout and a method of
|
||||
detecting network problems. The timeout is specified in seconds and a
|
||||
value of zero means that it is disabled.
|
||||
|
||||
* `tcpKeepAlive = boolean`
|
||||
|
||||
Enable or disable TCP keep-alive probe. The default is `false`.
|
||||
|
||||
* `unknownLength = int`
|
||||
|
||||
Certain postgresql types such as `TEXT` do not have a well defined length.
|
||||
When returning meta-data about these types through functions like
|
||||
`ResultSetMetaData.getColumnDisplaySize` and `ResultSetMetaData.getPrecision`
|
||||
we must provide a value and various client tools have different ideas
|
||||
about what they would like to see. This parameter specifies the length
|
||||
to return for types of unknown length.
|
||||
|
||||
* `stringtype = String`
|
||||
|
||||
Specify the type to use when binding `PreparedStatement` parameters set
|
||||
via `setString()`. If `stringtype` is set to `VARCHAR` (the default), such
|
||||
parameters will be sent to the server as varchar parameters. If `stringtype`
|
||||
is set to `unspecified`, parameters will be sent to the server as untyped
|
||||
values, and the server will attempt to infer an appropriate type. This
|
||||
is useful if you have an existing application that uses `setString()` to
|
||||
set parameters that are actually some other type, such as integers, and
|
||||
you are unable to change the application to use an appropriate method
|
||||
such as `setInt()`.
|
||||
|
||||
* `kerberosServerName = String`
|
||||
|
||||
The Kerberos service name to use when authenticating with GSSAPI. This
|
||||
is equivalent to libpq's PGKRBSRVNAME environment variable and defaults
|
||||
to "postgres".
|
||||
|
||||
* `jaasApplicationName = String`
|
||||
|
||||
Specifies the name of the JAAS system or application login configuration.
|
||||
|
||||
* `ApplicationName = String`
|
||||
|
||||
Specifies the name of the application that is using the connection.
|
||||
This allows a database administrator to see what applications are
|
||||
connected to the server and what resources they are using through views like pg_stat_activity.
|
||||
|
44
docs/documentation/92/datasource.md
Normal file
44
docs/documentation/92/datasource.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 11. Connection Pools and Data Sources
|
||||
header: Chapter 11. Connection Pools and Data Sources
|
||||
resource: media
|
||||
previoustitle: Chapter 10. Using the Driver in a Multithreaded or a Servlet Environment
|
||||
previous: thread.html
|
||||
nexttitle: Application Servers ConnectionPoolDataSource
|
||||
next: ds-cpds.html
|
||||
---
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
* [Overview](datasource.html#ds-intro)
|
||||
* [Application Servers: `ConnectionPoolDataSource`](ds-cpds.html)
|
||||
* [Applications: `DataSource`](ds-ds.html)
|
||||
* [Tomcat setup](tomcat.html)
|
||||
* [Data Sources and JNDI](jndi.html)
|
||||
|
||||
JDBC 2 introduced standard connection pooling features in an add-on API known as
|
||||
the JDBC 2.0 Optional Package (also known as the JDBC 2.0 Standard Extension).
|
||||
These features have since been included in the core JDBC 3 API.
|
||||
|
||||
<a name="ds-intro"></a>
|
||||
# Overview
|
||||
|
||||
The JDBC API provides a client and a server interface for connection pooling.
|
||||
The client interface is `javax.sql.DataSource`, which is what application code
|
||||
will typically use to acquire a pooled database connection. The server interface
|
||||
is `javax.sql.ConnectionPoolDataSource`, which is how most application servers
|
||||
will interface with the PostgreSQL™ JDBC driver.
|
||||
|
||||
In an application server environment, the application server configuration will
|
||||
typically refer to the PostgreSQL™ `ConnectionPoolDataSource` implementation,
|
||||
while the application component code will typically acquire a `DataSource`
|
||||
implementation provided by the application server (not by PostgreSQL™).
|
||||
|
||||
For an environment without an application server, PostgreSQL™ provides two
|
||||
implementations of `DataSource` which an application can use directly. One
|
||||
implementation performs connection pooling, while the other simply provides
|
||||
access to database connections through the `DataSource` interface without any
|
||||
pooling. Again, these implementations should not be used in an application server
|
||||
environment unless the application server does not support the `ConnectionPoolDataSource`
|
||||
interface.
|
24
docs/documentation/92/ddl.md
Normal file
24
docs/documentation/92/ddl.md
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Creating and Modifying Database Objects
|
||||
header: Chapter 5. Issuing a Query and Processing the Result
|
||||
resource: media
|
||||
previoustitle: Performing Updates
|
||||
previous: update.html
|
||||
nexttitle: Chapter 6. Calling Stored Functions
|
||||
next: callproc.html
|
||||
---
|
||||
|
||||
To create, modify or drop a database object like a table or view you use the
|
||||
`execute()` method. This method is similar to the method `executeQuery()`, but
|
||||
it doesn't return a result. [Example 5.4, “Dropping a Table in JDBC](ddl.html#drop-table-example)
|
||||
illustrates the usage.
|
||||
|
||||
<a name="drop-table-example"></a>
|
||||
**Example 5.4. Dropping a Table in JDBC**
|
||||
|
||||
This example will drop a table.
|
||||
|
||||
`Statement st = conn.createStatement();`
|
||||
`st.execute("DROP TABLE mytable");`
|
||||
`st.close();`
|
93
docs/documentation/92/ds-cpds.md
Normal file
93
docs/documentation/92/ds-cpds.md
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Application Servers ConnectionPoolDataSource
|
||||
header: Chapter 11. Connection Pools and Data Sources
|
||||
resource: media
|
||||
previoustitle: Chapter 11. Connection Pools and Data Sources
|
||||
previous: datasource.html
|
||||
nexttitle: Applications DataSource
|
||||
next: ds-ds.html
|
||||
---
|
||||
|
||||
PostgreSQL™ includes one implementation of `ConnectionPoolDataSource` named
|
||||
`org.postgresql.ds.PGConnectionPoolDataSource`.
|
||||
|
||||
JDBC requires that a `ConnectionPoolDataSource` be configured via JavaBean
|
||||
properties, shown in [Table 11.1, “`ConnectionPoolDataSource` Configuration Properties”](ds-cpds.html#ds-cpds-props),
|
||||
so there are get and set methods for each of these properties.
|
||||
|
||||
<a name="ds-cpds-props"></a>
|
||||
**Table 11.1. `ConnectionPoolDataSource` Configuration Properties**
|
||||
|
||||
<table summary="ConnectionPoolDataSource Configuration Properties"
|
||||
border="1">
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>serverName</td>
|
||||
<td>STRING</td>
|
||||
<td>PostgreSQL™ database server
|
||||
host name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>databaseName</td>
|
||||
<td>STRING</td>
|
||||
<td>PostgreSQL™ database name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>portNumber</td>
|
||||
<td>INT</td>
|
||||
<td> TCP port which the PostgreSQL™
|
||||
|
||||
database server is listening on (or 0 to use the default port) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user</td>
|
||||
<td>STRING</td>
|
||||
<td>User used to make database connections</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>STRING</td>
|
||||
<td>Password used to make database connections</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssl</td>
|
||||
<td>BOOLEAN</td>
|
||||
<td> If `true`, use SSL encrypted
|
||||
connections (default `false`) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sslfactory</td>
|
||||
<td>STRING</td>
|
||||
<td> Custom `javax.net.ssl.SSLSocketFactory`
|
||||
class name (see the section called [“Custom
|
||||
SSLSocketFactory”](ssl-factory.html)) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultAutoCommit</td>
|
||||
<td>BOOLEAN</td>
|
||||
<td> Whether connections should have autocommit enabled or
|
||||
disabled when they are supplied to the caller. The default is `false`, to disable autocommit. </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Many application servers use a properties-style syntax to configure these
|
||||
properties, so it would not be unusual to enter properties as a block of text.
|
||||
If the application server provides a single area to enter all the properties,
|
||||
they might be listed like this:
|
||||
|
||||
`serverName=localhost`
|
||||
`databaseName=test`
|
||||
`user=testuser`
|
||||
`password=testpassword`
|
||||
|
||||
Or, if semicolons are used as separators instead of newlines, it could look like
|
||||
this:
|
||||
|
||||
`serverName=localhost;databaseName=test;user=testuser;password=testpassword`
|
178
docs/documentation/92/ds-ds.md
Normal file
178
docs/documentation/92/ds-ds.md
Normal file
@ -0,0 +1,178 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Applications DataSource
|
||||
header: Chapter 11. Connection Pools and Data Sources
|
||||
resource: media
|
||||
previoustitle: Application Servers ConnectionPoolDataSource
|
||||
previous: ds-cpds.html
|
||||
nexttitle: Tomcat setup
|
||||
next: tomcat.html
|
||||
---
|
||||
|
||||
PostgreSQL™ includes two implementations of `DataSource`, as shown in [Table 11.2, “`DataSource` Implementations”](ds-ds.html#ds-ds-imp).
|
||||
One that does pooling and the other that does not. The pooling implementation
|
||||
does not actually close connections when the client calls the `close` method,
|
||||
but instead returns the connections to a pool of available connections for other
|
||||
clients to use. This avoids any overhead of repeatedly opening and closing
|
||||
connections, and allows a large number of clients to share a small number of
|
||||
database connections.
|
||||
|
||||
The pooling data-source implementation provided here is not the most feature-rich
|
||||
in the world. Among other things, connections are never closed until the pool
|
||||
itself is closed; there is no way to shrink the pool. As well, connections
|
||||
requested for users other than the default configured user are not pooled. Its
|
||||
error handling sometimes cannot remove a broken connection from the pool. In
|
||||
general it is not recommended to use the PostgreSQL™ provided connection pool.
|
||||
Check your application server or check out the excellent [jakarta commons DBCP](http://jakarta.apache.org/commons/dbcp/)
|
||||
project.
|
||||
|
||||
<a name="ds-ds-imp"></a>
|
||||
**Table 11.2. `DataSource` Implementations**
|
||||
|
||||
<table summary="DataSource Implementations" border="1">
|
||||
<tr>
|
||||
<th>Pooling</th>
|
||||
<th>Implementation Class</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>No</td>
|
||||
<td>`org.postgresql.ds.PGSimpleDataSource</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yes</td>
|
||||
<td>`org.postgresql.ds.PGPoolingDataSource</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Both implementations use the same configuration scheme. JDBC requires that a
|
||||
`DataSource` be configured via JavaBean properties, shown in [Table 11.3, “`DataSource` Configuration Properties”](ds-ds.html#ds-ds-props),
|
||||
so there are get and set methods for each of these properties.
|
||||
|
||||
<a name="ds-ds-props"></a>
|
||||
**Table 11.3. `DataSource` Configuration Properties**
|
||||
|
||||
<table summary="DataSource Configuration Properties" border="1">
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>serverName</td>
|
||||
<td>STRING</td>
|
||||
<td>PostgreSQL™ database server host name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>databaseName</td>
|
||||
<td>STRING</td>
|
||||
<td>PostgreSQL™ database name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>portNumber</td>
|
||||
<td>INT</td>
|
||||
<td>TCP port which the PostgreSQL™
|
||||
database server is listening on (or 0 to use the default port)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user</td>
|
||||
<td>STRING</td>
|
||||
<td>User used to make database connections</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>STRING</td>
|
||||
<td>Password used to make database connections</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssl</td>
|
||||
<td>BOOLEAN</td>
|
||||
<td> If true, use SSL encrypted
|
||||
connections (default false) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sslfactory</td>
|
||||
<td>STRING</td>
|
||||
<td> Custom javax.net.ssl.SSLSocketFactory
|
||||
class name (see the section called [“Custom
|
||||
SSLSocketFactory”](ssl-factory.html))</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
The pooling implementation requires some additional configuration properties,
|
||||
which are shown in [Table 11.4, “Additional Pooling `DataSource` Configuration Properties](ds-ds.html#ds-ds-xprops).
|
||||
|
||||
<a name="ds-ds-xprops"></a>
|
||||
**Table 11.4. Additional Pooling `DataSource` Configuration Properties**
|
||||
|
||||
<table summary="Additional Pooling DataSource Configuration Properties" border="1">
|
||||
<tr>
|
||||
<th>Property</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>dataSourceName</td>
|
||||
<td>STRING</td>
|
||||
<td>Every pooling DataSource must
|
||||
have a unique name.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>initialConnections</td>
|
||||
<td>INT</td>
|
||||
<td>The number of database connections to be created when the
|
||||
pool is initialized.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maxConnections</td>
|
||||
<td>INT</td>
|
||||
<td>The maximum number of open database connections to allow.
|
||||
When more connections are requested, the caller will hang until a
|
||||
connection is returned to the pool.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
[Example 11.1, “`DataSource` Code Example”](ds-ds.html#ds-example) shows an example
|
||||
of typical application code using a pooling `DataSource`.
|
||||
|
||||
<a name="ds-example"></a>
|
||||
**Example 11.1. `DataSource` Code Example**
|
||||
|
||||
Code to initialize a pooling `DataSource` might look like this:
|
||||
|
||||
`PGPoolingDataSource source = new PGPoolingDataSource();`
|
||||
`source.setDataSourceName("A Data Source");`
|
||||
`source.setServerName("localhost");`
|
||||
`source.setDatabaseName("test");`
|
||||
`source.setUser("testuser");`
|
||||
`source.setPassword("testpassword");`
|
||||
`source.setMaxConnections(10);`
|
||||
|
||||
Then code to use a connection from the pool might look like this. Note that it
|
||||
is critical that the connections are eventually closed. Else the pool will
|
||||
“leak” connections and will eventually lock all the clients out.
|
||||
|
||||
<pre><code>
|
||||
Connection conn = null;
|
||||
try
|
||||
{
|
||||
conn = source.getConnection();
|
||||
// use connection
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
// log error
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (con != null)
|
||||
{
|
||||
try { conn.close(); } catch (SQLException e) {}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
480
docs/documentation/92/escaped-functions.md
Normal file
480
docs/documentation/92/escaped-functions.md
Normal file
@ -0,0 +1,480 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Escaped scalar functions
|
||||
header: Chapter 8. JDBC escapes
|
||||
resource: media
|
||||
previoustitle: Date-time escapes
|
||||
previous: escapes-datetime.html
|
||||
nexttitle: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
next: ext.html
|
||||
---
|
||||
|
||||
The JDBC specification defines functions with an escape call syntax : `{fn function_name(arguments)}`.
|
||||
The following tables show which functions are supported by the PostgresSQL™ driver.
|
||||
The driver supports the nesting and the mixing of escaped functions and escaped
|
||||
values. The appendix C of the JDBC specification describes the functions.
|
||||
|
||||
Some functions in the following tables are translated but not reported as supported
|
||||
because they are duplicating or changing their order of the arguments. While this
|
||||
is harmless for literal values or columns, it will cause problems when using
|
||||
prepared statements. For example "`{fn right(?,?)}`" will be translated to "`substring(? from (length(?)+1-?))`".
|
||||
As you can see the translated SQL requires more parameters than before the
|
||||
translation but the driver will not automatically handle this.
|
||||
|
||||
<a name="escape-numeric-functions-table"></a>
|
||||
**Table 8.1. Supported escaped numeric functions**
|
||||
|
||||
<table summary="Supported escaped numeric functions" border="1">
|
||||
<tr>
|
||||
<th>function</th>
|
||||
<th>reported as supported</th>
|
||||
<th>translation</th>
|
||||
<th>comments</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>abs(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>abs(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>acos(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>acos(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>asin(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>asin(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>atan(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>atan(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>atan2(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>atan2(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ceiling(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>ceil(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cos(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>cos(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cot(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>cot(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>degrees(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>degrees(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>exp(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>exp(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>floor(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>floor(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>log(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>ln(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>log10(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>log(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mod(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>mod(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pi(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>pi(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>power(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>pow(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>radians(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>radians(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rand()</td>
|
||||
<td>yes</td>
|
||||
<td>random()</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rand(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>setseed(arg1)*0+random()</td>
|
||||
<td>The seed is initialized with the given argument and a new randow value is returned.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>round(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>round(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sign(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>sign(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sin(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>sin(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sqrt(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>sqrt(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tan(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>tan(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>truncate(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>trunc(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a name="escape-string-functions-table"></a>
|
||||
**Table 8.2. Supported escaped string functions**
|
||||
|
||||
<table summary="Supported escaped string functions" border="1">
|
||||
<tr>
|
||||
<th>function</th>
|
||||
<th>reported as supported</th>
|
||||
<th>translation</th>
|
||||
<th>comments</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ascii(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>ascii(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>char(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>chr(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>concat(arg1,arg2...)</td>
|
||||
<td>yes</td>
|
||||
<td>(arg1||arg2...)</td>
|
||||
<td>The JDBC specification
|
||||
only require the two arguments version, but supporting more arguments
|
||||
was so easy...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>insert(arg1,arg2,arg3,arg4)</td>
|
||||
<td>no</td>
|
||||
<td>overlay(arg1 placing arg4 from arg2 for arg3)</td>
|
||||
<td>This function is not reported as supported since it changes
|
||||
the order of the arguments which can be a problem (for prepared
|
||||
statements by example).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>lcase(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>lower(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>left(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>substring(arg1 for arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>length(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>length(trim(trailing from arg1))</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>locate(arg1,arg2)</td>
|
||||
<td>no</td>
|
||||
<td>position(arg1 in arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>locate(arg1,arg2,arg3)</td>
|
||||
<td>no</td>
|
||||
<td>(arg2*sign(position(arg1 in substring(arg2 from
|
||||
arg3)+position(arg1 in substring(arg2 from arg3))</td>
|
||||
<td>Not reported as supported since the three arguments version
|
||||
duplicate and change the order of the arguments.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ltrim(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>trim(leading from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>repeat(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>repeat(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>replace(arg1,arg2,arg3)</td>
|
||||
<td>yes</td>
|
||||
<td>replace(arg1,arg2,arg3)</td>
|
||||
<td>Only reported as supported by 7.3 and above servers.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>right(arg1,arg2)</td>
|
||||
<td>no</td>
|
||||
<td>substring(arg1 from (length(arg1)+1-arg2))</td>
|
||||
<td>Not reported as supported since arg2 is duplicated.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rtrim(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>trim(trailing from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>space(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>repeat(' ',arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>substring(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>substr(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>substring(arg1,arg2,arg3)</td>
|
||||
<td>yes</td>
|
||||
<td>substr(arg1,arg2,arg3)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ucase(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>upper(arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>soundex(arg1)</td>
|
||||
<td>no</td>
|
||||
<td>soundex(arg1)</td>
|
||||
<td>Not reported as supported since it requires the fuzzystrmatch
|
||||
contrib module.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>difference(arg1,arg2)</td>
|
||||
<td>no</td>
|
||||
<td>difference(arg1,arg2)</td>
|
||||
<td>Not reported as supported since it requires the fuzzystrmatch
|
||||
contrib module.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a name="escape-datetime-functions-table"></a>
|
||||
**Table 8.3. Supported escaped date/time functions**
|
||||
|
||||
<table summary="Supported escaped date/time functions" border="1">
|
||||
<tr>
|
||||
<th>function</th>
|
||||
<th>reported as supported</th>
|
||||
<th>translation</th>
|
||||
<th>comments</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>curdate()</td>
|
||||
<td>yes</td>
|
||||
<td>current_date</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>curtime()</td>
|
||||
<td>yes</td>
|
||||
<td>current_time</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dayname(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>to_char(arg1,'Day')</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dayofmonth(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(day from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dayofweek(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(dow from arg1)+1</td>
|
||||
<td>We must add 1 to be in the expected 1-7 range.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dayofyear(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(doy from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hour(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(hour from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>minute(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(minute from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>month(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(month from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>monthname(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>to_char(arg1,'Month')</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>now()</td>
|
||||
<td>yes</td>
|
||||
<td>now()</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>quarter(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(quarter from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>second(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(second from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>week(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(week from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>year(arg1)</td>
|
||||
<td>yes</td>
|
||||
<td>extract(year from arg1)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>timestampadd(argIntervalType,argCount,argTimeStamp)</td>
|
||||
<td>yes</td>
|
||||
<td>('(interval according to argIntervalType and
|
||||
argCount)'+argTimeStamp)</td>
|
||||
<td>an argIntervalType value of SQL_TSI_FRAC_SECOND
|
||||
is not implemented since backend does not support it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>timestampdiff(argIntervalType,argTimeStamp1,argTimeStamp2)</td>
|
||||
<td>not</td>
|
||||
<td>extract((interval according to argIntervalType) from
|
||||
argTimeStamp2-argTimeStamp1 )</td>
|
||||
<td>only an argIntervalType value of SQL_TSI_FRAC_SECOND, SQL_TSI_FRAC_MINUTE, SQL_TSI_FRAC_HOUR
|
||||
or SQL_TSI_FRAC_DAY is supported </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a name="escape-misc-functions-table"></a>
|
||||
**Table 8.4. Supported escaped misc functions**
|
||||
|
||||
<table summary="Supported escaped misc functions" border="1">
|
||||
<tr>
|
||||
<th>function</th>
|
||||
<th>reported as supported</th>
|
||||
<th>translation</th>
|
||||
<th>comments</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>database()</td>
|
||||
<td>yes</td>
|
||||
<td>current_database()</td>
|
||||
<td>Only reported as supported by 7.3 and above servers.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ifnull(arg1,arg2)</td>
|
||||
<td>yes</td>
|
||||
<td>coalesce(arg1,arg2)</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user()</td>
|
||||
<td>yes</td>
|
||||
<td>user</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
23
docs/documentation/92/escapes-datetime.md
Normal file
23
docs/documentation/92/escapes-datetime.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Date-time escapes
|
||||
header: Chapter 8. JDBC escapes
|
||||
resource: media
|
||||
previoustitle: Escape for outer joins
|
||||
previous: outer-joins-escape.html
|
||||
nexttitle: Escaped scalar functions
|
||||
next: escaped-functions.html
|
||||
---
|
||||
|
||||
The JDBC specification defines escapes for specifying date, time and timestamp
|
||||
values which are supported by the driver.
|
||||
|
||||
> date
|
||||
>> `{d 'yyyy-mm-dd'}` which is translated to `DATE 'yyyy-mm-dd'`
|
||||
|
||||
> time
|
||||
>> `{t 'hh:mm:ss'}` which is translated to `TIME 'hh:mm:ss'`
|
||||
|
||||
> timestamp
|
||||
>> `{ts 'yyyy-mm-dd hh:mm:ss.f...'}` which is translated to `TIMESTAMP 'yyyy-mm-dd hh:mm:ss.f'`<br /><br />
|
||||
>> The fractional seconds (.f...) portion of the TIMESTAMP can be omitted.
|
57
docs/documentation/92/escapes.md
Normal file
57
docs/documentation/92/escapes.md
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 8. JDBC escapes
|
||||
header: Chapter 8. JDBC escapes
|
||||
resource: media
|
||||
previoustitle: Chapter 7. Storing Binary Data
|
||||
previous: binary-data.html
|
||||
nexttitle: Escape for outer joins
|
||||
next: outer-joins-escape.html
|
||||
---
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
* [Escape for like escape character](escapes.html#like-escape)
|
||||
* [Escape for outer joins](outer-joins-escape.html)
|
||||
* [Date-time escapes](escapes-datetime.html)
|
||||
* [Escaped scalar functions](escaped-functions.html)
|
||||
|
||||
The JDBC specification (like the ODBC specification) acknowledges the fact that
|
||||
some vendor specific SQL may be required for certain RDBMS features. To aid
|
||||
developers in writing portable JDBC applications across multiple database products,
|
||||
a special escape syntax is used to specify the generic commands the developer
|
||||
wants to be run. The JDBC driver translates these escape sequences into native
|
||||
syntax for its specific database. For more information consult the section 4.1.5
|
||||
from the [JDBC Technology Guide](http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/statement.html#999472)
|
||||
(bundled with the Oracle™ JRE documentation) and the section 13.4 from the
|
||||
[JDBC 3.0 specification](http://java.sun.com/products/jdbc/download.html#corespec30).
|
||||
|
||||
The parsing of the sql statements for these escapes can be disabled using
|
||||
`Statement.setEscapeProcessing(false)`.
|
||||
|
||||
`Connection.nativeSQL(String sql)` provides another way to have escapes processed.
|
||||
It translates the given SQL to a SQL suitable for the PostgreSQL™ backend.
|
||||
|
||||
<a name="escape-use-example"></a>
|
||||
**Example 8.1. Using jdbc escapes**
|
||||
|
||||
To use the JDBC escapes, you simply write your SQL replacing date/time literal
|
||||
values, outer join and functions by the JDBC escape syntax. For example :
|
||||
|
||||
`ResultSet rs = st.executeQuery("SELECT {fn week({d '2005-01-24'})}");`
|
||||
|
||||
is the portable version for
|
||||
|
||||
`ResultSet rs = st.executeQuery("SELECT extract(week from DATE '2005-01-24')");`
|
||||
|
||||
<a name="like-escape"></a>
|
||||
# Escape for like escape character
|
||||
|
||||
You can specify which escape character to use in strings comparison (with `LIKE`)
|
||||
to protect wildcards characters ('%' and '_') by adding the following escape :
|
||||
`{escape 'escape-character'}`. The driver supports this only at the end of the
|
||||
comparison expression.
|
||||
|
||||
For example, you can compare string values using '|' as escape character to protect '_' :
|
||||
|
||||
`rs = stmt.executeQuery("select str2 from comparisontest where str1 like '|_abcd' {escape '|'} ");`
|
36
docs/documentation/92/ext.md
Normal file
36
docs/documentation/92/ext.md
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
header: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
resource: media
|
||||
previoustitle: Escaped scalar functions
|
||||
previous: escaped-functions.html
|
||||
nexttitle: Geometric Data Types
|
||||
next: geometric.html
|
||||
---
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
* [Accessing the Extensions](ext.html#extensions)
|
||||
* [Geometric Data Types](geometric.html)
|
||||
* [Large Objects](largeobjects.html)
|
||||
* [Listen / Notify](listennotify.html)
|
||||
* [Server Prepared Statements](server-prepare.html)
|
||||
|
||||
PostgreSQL™ is an extensible database system. You can add your own functions to
|
||||
the server, which can then be called from queries, or even add your own data types.
|
||||
As these are facilities unique to PostgreSQL™, we support them from Java, with a
|
||||
set of extension APIs. Some features within the core of the standard driver
|
||||
actually use these extensions to implement Large Objects, etc.
|
||||
|
||||
<a name="extensions"></a>
|
||||
# Accessing the Extensions
|
||||
|
||||
To access some of the extensions, you need to use some extra methods in the
|
||||
`org.postgresql.PGConnection` class. In this case, you would need to case the
|
||||
return value of `Driver.getConnection()`. For example:
|
||||
|
||||
`Connection db = Driver.getConnection(url, username, password);`
|
||||
`// ...`
|
||||
`// later on`
|
||||
`Fastpath fp = db.unwrap(org.postgresql.PGConnection.class).getFastpathAPI();`
|
68
docs/documentation/92/geometric.md
Normal file
68
docs/documentation/92/geometric.md
Normal file
@ -0,0 +1,68 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Geometric Data Types
|
||||
header: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
resource: media
|
||||
previoustitle: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
previous: ext.html
|
||||
nexttitle: Large Objects
|
||||
next: largeobjects.html
|
||||
---
|
||||
|
||||
PostgreSQL™ has a set of data types that can store geometric features into a
|
||||
table. These include single points, lines, and polygons. We support these types
|
||||
in Java with the org.postgresql.geometric package. Please consult the Javadoc
|
||||
for the details of available classes and features metioned in [Chapter 12, *Further Reading*](reading.html).
|
||||
|
||||
<a name="geometric-circle-example"></a>
|
||||
**Example 9.1. Using the CIRCLE datatype JDBC**
|
||||
|
||||
import java.sql.*;
|
||||
|
||||
import org.postgresql.geometric.PGpoint;
|
||||
import org.postgresql.geometric.PGcircle;
|
||||
|
||||
public class GeometricTest {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
Class.forName("org.postgresql.Driver");
|
||||
String url = "jdbc:postgresql://localhost:5432/test";
|
||||
|
||||
Connection conn = DriverManager.getConnection(url,"test","");
|
||||
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.execute("CREATE TEMP TABLE geomtest(mycirc circle)");
|
||||
stmt.close();
|
||||
|
||||
insertCircle(conn);
|
||||
retrieveCircle(conn);
|
||||
conn.close();
|
||||
}
|
||||
|
||||
private static void insertCircle(Connection conn) throws SQLException {
|
||||
|
||||
PGpoint center = new PGpoint(1, 2.5);
|
||||
double radius = 4;
|
||||
PGcircle circle = new PGcircle(center, radius);
|
||||
|
||||
PreparedStatement ps = conn.prepareStatement("INSERT INTO geomtest(mycirc) VALUES (?)");
|
||||
ps.setObject(1, circle);
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
}
|
||||
|
||||
private static void retrieveCircle(Connection conn) throws SQLException {
|
||||
Statement stmt = conn.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT mycirc, area(mycirc) FROM geomtest");
|
||||
rs.next();
|
||||
PGcircle circle = (PGcircle)rs.getObject(1);
|
||||
double area = rs.getDouble(2);
|
||||
|
||||
PGpoint center = circle.center;
|
||||
double radius = circle.radius;
|
||||
|
||||
System.out.println("Center (X, Y) = (" + center.x + ", " + center.y + ")");
|
||||
System.out.println("Radius = " + radius);
|
||||
System.out.println("Area = " + area);
|
||||
}
|
||||
}
|
253
docs/documentation/92/index.html
Normal file
253
docs/documentation/92/index.html
Normal file
@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
|
||||
<head>
|
||||
<title>The PostgreSQL™ JDBC Interface</title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
|
||||
<meta name="description" content="The official site for the PostgreSQL JDBC Driver" />
|
||||
<meta name="copyright" content="The PostgreSQL Global Development Group" />
|
||||
|
||||
<style type="text/css" media="screen" title="Normal Text">@import url("media/css/docs.css");</style>
|
||||
|
||||
<link rel="shortcut icon" href="media/favicon.ico" />
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="docHeader">
|
||||
<div id="docHeaderLogo">
|
||||
<a href="http://www.postgresql.org/" title="PostgreSQL"><img src="media/img/layout/hdr_left3a.png" alt="PostgreSQL" height="80" width="390" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="docContainerWrap">
|
||||
<div id="docContainer">
|
||||
<div id="docContent">
|
||||
<div class="BOOK">
|
||||
<a name="POSTGRES" id="POSTGRES"></a>
|
||||
<div class="TITLEPAGE">
|
||||
<h1 class="TITLE">The PostgreSQL JDBC Interface</h1>
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div class="TOC">
|
||||
<h3 class="c2">Table of Contents</h3>
|
||||
<dl>
|
||||
<!-- <dt class="c1">Table of Contents</dt> -->
|
||||
|
||||
<dt>1. <a href="intro.html">Introduction</a></dt>
|
||||
|
||||
<dt>2. <a href="setup.html">Setting up the JDBC Driver</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="setup.html#build">Getting the Driver</a></dt>
|
||||
<dt><a href="classpath.html">Setting up the Class Path</a></dt>
|
||||
<dt><a href="prepare.html">Preparing the Database Server for <acronym class="ACRONYM">JDBC</acronym></a></dt>
|
||||
<dt><a href="your-database.html">Creating a Database</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>3. <a href="use.html">Initializing the Driver</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="use.html#import">Importing <acronym class="ACRONYM">JDBC</acronym></a></dt>
|
||||
<dt><a href="load.html">Loading the Driver</a></dt>
|
||||
<dt><a href="connect.html">Connecting to the Database</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="connect.html#connection-parameters">Connection Parameters</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>4. <a href="ssl.html">Using <acronym class="ACRONYM">SSL</acronym></a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="ssl.html#ssl-server">Configuring the Server</a></dt>
|
||||
<dt><a href="ssl-client.html">Configuring the Client</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="ssl-client.html#nonvalidating">Using SSL without Certificate Validation</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><a href="ssl-factory.html">Custom SSLSocketFactory</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>5. <a href="query.html">Issuing a Query and Processing the Result</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="query.html#query-with-cursor">Getting results based on a cursor</a></dt>
|
||||
<dt><a href="statement.html">Using the Statement or PreparedStatement Interface</a></dt>
|
||||
<dt><a href="resultset.html">Using the ResultSet Interface</a></dt>
|
||||
<dt><a href="update.html">Performing Updates</a></dt>
|
||||
<dt><a href="ddl.html">Creating and Modifying Database Objects</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>6. <a href="callproc.html">Calling Stored Functions</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="callproc.html#callproc-resultset">Obtaining a ResultSet from a stored function</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="callproc.html#callproc-resultset-setof">From a Function Returning SETOF type</a></dt>
|
||||
<dt><a href="callproc.html#callproc-resultset-refcursor">From a Function Returning a <span class="type">refcursor</span></a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>7. <a href="binary-data.html">Storing Binary Data</a></dt>
|
||||
|
||||
<dt>8. <a href="escapes.html"><acronym class="ACRONYM">JDBC</acronym> escapes</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="escapes.html#like-escape">Escape for like escape character</a></dt>
|
||||
<dt><a href="outer-joins-escape.html">Escape for outer joins</a></dt>
|
||||
<dt><a href="escapes-datetime.html">Date-time escapes</a></dt>
|
||||
<dt><a href="escaped-functions.html">Escaped scalar functions</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>9. <a href="ext.html">PostgreSQL™ Extensions to the <acronym class="ACRONYM">JDBC</acronym> <acronym class="ACRONYM">API</acronym></a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="ext.html#extensions">Accessing the Extensions</a></dt>
|
||||
<dt><a href="geometric.html">Geometric Data Types</a></dt>
|
||||
<dt><a href="largeobjects.html">Large Objects</a></dt>
|
||||
<dt><a href="listennotify.html">Listen / Notify</a></dt>
|
||||
<dt><a href="server-prepare.html">Server Prepared Statements</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>10. <a href="thread.html">Using the Driver in a Multithreaded or a Servlet Environment</a></dt>
|
||||
|
||||
<dt>11. <a href="datasource.html">Connection Pools and Data Sources</a></dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt><a href="datasource.html#ds-intro">Overview</a></dt>
|
||||
<dt><a href="ds-cpds.html">Application Servers: ConnectionPoolDataSource</a></dt>
|
||||
<dt><a href="ds-ds.html">Applications: DataSource</a></dt>
|
||||
<dt><a href="tomcat.html">Tomcat setup</a></dt>
|
||||
<dt><a href="jndi.html">Data Sources and <acronym class="ACRONYM">JNDI</acronym></a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt>12. <a href="reading.html">Further Reading</a></dt>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="LOT">
|
||||
<h3 class="c2">List of Tables</h3>
|
||||
<dl class="LOT">
|
||||
<!-- <dt class="c1">List of Tables</dt> -->
|
||||
<dt>
|
||||
8.1. <a href="escaped-functions.html#escape-numeric-functions-table">Supported escaped numeric functions</a>
|
||||
</dt>
|
||||
<dt>
|
||||
8.2. <a href="escaped-functions.html#escape-string-functions-table">Supported escaped string functions</a>
|
||||
</dt>
|
||||
<dt>
|
||||
8.3. <a href="escaped-functions.html#escape-datetime-functions-table">Supported escaped date/time functions</a>
|
||||
</dt>
|
||||
<dt>
|
||||
8.4. <a href="escaped-functions.html#escape-misc-functions-table">Supported escaped misc functions</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.1. <a href="ds-cpds.html#ds-cpds-props">ConnectionPoolDataSource Configuration Properties</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.2. <a href="ds-ds.html#ds-ds-imp">DataSource Implementations</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.3. <a href="ds-ds.html#ds-ds-props">DataSource Configuration Properties</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.4. <a href="ds-ds.html#ds-ds-xprops">Additional Pooling DataSource Configuration Properties</a>
|
||||
</dt>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="LOT">
|
||||
<h3 class="c2">List of Examples</h3>
|
||||
<dl class="LOT">
|
||||
<!-- <dt class="c1">List of Examples</dt> -->
|
||||
<dt>
|
||||
5.1. <a href="query.html#query-example">Processing a Simple Query in <acronym class="ACRONYM">JDBC</acronym></a>
|
||||
</dt>
|
||||
<dt>
|
||||
5.2. <a href="query.html#fetchsize-example">Setting fetch size to turn cursors on and off.</a>
|
||||
</dt>
|
||||
<dt>
|
||||
5.3. <a href="update.html#delete-example">Deleting Rows in <acronym class="ACRONYM">JDBC</acronym></a>
|
||||
</dt>
|
||||
<dt>
|
||||
5.4. <a href="ddl.html#drop-table-example">Dropping a Table in <acronym class="ACRONYM">JDBC</acronym></a>
|
||||
</dt>
|
||||
<dt>
|
||||
6.1. <a href="callproc.html#call-function-example">Calling a built in stored function</a>
|
||||
</dt>
|
||||
<dt>
|
||||
6.2. <a href="callproc.html#setof-resultset"> Getting SETOF type values from a function</a>
|
||||
</dt>
|
||||
<dt>
|
||||
6.3. <a href="callproc.html#get-refcursor-from-function-call"> Getting <span class="type">refcursor</span> Value From a Function</a>
|
||||
</dt>
|
||||
<dt>
|
||||
6.4. <a href="callproc.html#refcursor-string-example">Treating <span class="type">refcursor</span> as a cursor name</a>
|
||||
</dt>
|
||||
<dt>
|
||||
7.1. <a href="binary-data.html#binary-data-example">Processing Binary Data in <acronym class="ACRONYM">JDBC</acronym></a>
|
||||
</dt>
|
||||
<dt>
|
||||
8.1. <a href="escapes.html#escape-use-example">Using jdbc escapes</a>
|
||||
</dt>
|
||||
<dt>
|
||||
9.1. <a href="geometric.html#geometric-circle-example">Using the CIRCLE datatype from <acronym class="ACRONYM">JDBC</acronym></a>
|
||||
</dt>
|
||||
<dt>
|
||||
9.2. <a href="listennotify.html#listen-notify-example">Receiving Notifications</a>
|
||||
</dt>
|
||||
<dt>
|
||||
9.3. <a href="server-prepare.html#server-prepared-statement-example">Using server side prepared statements</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.1. <a href="ds-ds.html#ds-example">DataSource Code Example</a>
|
||||
</dt>
|
||||
<dt>
|
||||
11.2. <a href="jndi.html#ds-jndi">DataSource <acronym class="ACRONYM">JNDI</acronym> Code Example</a>
|
||||
</dt>
|
||||
</dl>
|
||||
</div>
|
||||
</div> <!-- BOOK -->
|
||||
|
||||
<div class="NAVFOOTER">
|
||||
<hr class="c2" width="100%" />
|
||||
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="33%" align="left"> </td>
|
||||
<td valign="top" width="34%" align="center"> </td>
|
||||
<td valign="top" width="33%" align="right"><a href="intro.html" accesskey="N">Next</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="33%" align="left"> </td>
|
||||
<td valign="top" width="34%" align="center"> </td>
|
||||
<td valign="top" width="33%" align="right">Chapter 1. Introduction</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!--docContent -->
|
||||
|
||||
<div id="docComments"></div>
|
||||
|
||||
<div id="docFooter">
|
||||
<a class="navFooter" href="http://www.postgresql.org/about/privacypolicy">Privacy Policy</a> |
|
||||
<a class="navFooter" href="http://www.postgresql.org/about/">About PostgreSQL</a><br/>
|
||||
Copyright © 1996-2013 The PostgreSQL Global Development Group
|
||||
</div> <!-- pgFooter -->
|
||||
</div> <!-- docContainer -->
|
||||
</div> <!-- docContainerWrap -->
|
||||
</body>
|
22
docs/documentation/92/intro.md
Normal file
22
docs/documentation/92/intro.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 1. Introduction
|
||||
header: Chapter 1. Introduction
|
||||
resource: media
|
||||
previoustitle: The PostgreSQL™ JDBC Interface
|
||||
previous: index.html
|
||||
nexttitle: Chapter 2. Setting up the JDBC Driver
|
||||
next: setup.html
|
||||
---
|
||||
|
||||
JDBC is a core API of Java 1.1 and later. It provides a standard set of interfaces
|
||||
to SQL-compliant databases.
|
||||
|
||||
PostgreSQL™ provides a *type 4* JDBC driver. Type 4 indicates that the driver is
|
||||
written in Pure Java, and communicates in the database system's own network protocol.
|
||||
Because of this, the driver is platform independent; once compiled, the driver
|
||||
can be used on any system.
|
||||
|
||||
This manual is not intended as a complete guide to JDBC programming, but should
|
||||
help to get you started. For more information refer to the standard JDBC API
|
||||
documentation. Also, take a look at the examples included with the source.
|
68
docs/documentation/92/jndi.md
Normal file
68
docs/documentation/92/jndi.md
Normal file
@ -0,0 +1,68 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Data Sources and JNDI
|
||||
header: Chapter 11. Connection Pools and Data Sources
|
||||
resource: media
|
||||
previoustitle: Tomcat setup
|
||||
previous: tomcat.html
|
||||
nexttitle: Chapter 12. Further Reading
|
||||
next: reading.html
|
||||
---
|
||||
|
||||
All the `ConnectionPoolDataSource` and `DataSource` implementations can be stored
|
||||
in JNDI. In the case of the nonpooling implementations, a new instance will be
|
||||
created every time the object is retrieved from JNDI, with the same settings as
|
||||
the instance that was stored. For the pooling implementations, the same instance
|
||||
will be retrieved as long as it is available (e.g., not a different JVM retrieving
|
||||
the pool from JNDI), or a new instance with the same settings created otherwise.
|
||||
|
||||
In the application server environment, typically the application server's
|
||||
`DataSource` instance will be stored in JNDI, instead of the PostgreSQL™
|
||||
`ConnectionPoolDataSource` implementation.
|
||||
|
||||
In an application environment, the application may store the `DataSource` in JNDI
|
||||
so that it doesn't have to make a reference to the `DataSource` available to all
|
||||
application components that may need to use it. An example of this is shown in
|
||||
[Example 11.2, “`DataSource` JNDI Code Example”](jndi.html#ds-jndi).
|
||||
|
||||
<a name="ds-jndi"></a>
|
||||
**Example 11.2. `DataSource` JNDI Code Example**
|
||||
|
||||
Application code to initialize a pooling `DataSource` and add it to JNDI might
|
||||
look like this:
|
||||
|
||||
`PGPoolingDataSource source = new PGPoolingDataSource();`
|
||||
`source.setDataSourceName("A Data Source");`
|
||||
`source.setServerName("localhost");`
|
||||
`source.setDatabaseName("test");`
|
||||
`source.setUser("testuser");`
|
||||
`source.setPassword("testpassword");`
|
||||
`source.setMaxConnections(10);`
|
||||
`new InitialContext().rebind("DataSource", source);`
|
||||
|
||||
Then code to use a connection from the pool might look like this:
|
||||
|
||||
<pre><code>
|
||||
Connection conn = null;
|
||||
try
|
||||
{
|
||||
DataSource source = (DataSource)new InitialContext().lookup("DataSource");
|
||||
conn = source.getConnection();
|
||||
// use connection
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
// log error
|
||||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
// DataSource wasn't found in JNDI
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (con != null)
|
||||
{
|
||||
try { conn.close(); } catch (SQLException e) {}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
20
docs/documentation/92/largeobjects.md
Normal file
20
docs/documentation/92/largeobjects.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Large Objects
|
||||
header: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
resource: media
|
||||
previoustitle: Geometric Data Types
|
||||
previous: geometric.html
|
||||
nexttitle: Listen / Notify
|
||||
next: listennotify.html
|
||||
---
|
||||
|
||||
Large objects are supported in the standard JDBC specification. However, that
|
||||
interface is limited, and the API provided by PostgreSQL™ allows for random
|
||||
access to the objects contents, as if it was a local file.
|
||||
|
||||
The org.postgresql.largeobject package provides to Java the libpq C interface's
|
||||
large object API. It consists of two classes, `LargeObjectManager`, which deals
|
||||
with creating, opening and deleting large objects, and `LargeObject` which deals
|
||||
with an individual object. For an example usage of this API, please see
|
||||
[Example 7.1, “Processing Binary Data in JDBC”](binary-data.html#binary-data-example).
|
148
docs/documentation/92/listennotify.md
Normal file
148
docs/documentation/92/listennotify.md
Normal file
@ -0,0 +1,148 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Listen / Notify
|
||||
header: Chapter 9. PostgreSQL™ Extensions to the JDBC API
|
||||
resource: media
|
||||
previoustitle: Large Objects
|
||||
previous: largeobjects.html
|
||||
nexttitle: Server Prepared Statements
|
||||
next: server-prepare.html
|
||||
---
|
||||
|
||||
Listen and Notify provide a simple form of signal or interprocess communication
|
||||
mechanism for a collection of processes accessing the same PostgreSQL™ database.
|
||||
For more information on notifications consult the main server documentation. This
|
||||
section only deals with the JDBC specific aspects of notifications.
|
||||
|
||||
Standard `LISTEN`, `NOTIFY`, and `UNLISTEN` commands are issued via the standard
|
||||
`Statement` interface. To retrieve and process retrieved notifications the
|
||||
`Connection` must be cast to the PostgreSQL™ specific extension interface
|
||||
`PGConnection`. From there the `getNotifications()` method can be used to retrieve
|
||||
any outstanding notifications.
|
||||
|
||||
### Note
|
||||
|
||||
> A key limitation of the JDBC driver is that it cannot receive asynchronous
|
||||
notifications and must poll the backend to check if any notifications were issued.
|
||||
|
||||
<a name="listen-notify-example"></a>
|
||||
**Example 9.2. Receiving Notifications**
|
||||
|
||||
<pre><code>
|
||||
import java.sql.*;
|
||||
|
||||
public class NotificationTest
|
||||
{
|
||||
public static void main(String args[]) throws Exception
|
||||
{
|
||||
Class.forName("org.postgresql.Driver");
|
||||
String url = "jdbc:postgresql://localhost:5432/test";
|
||||
|
||||
// Create two distinct connections, one for the notifier
|
||||
// and another for the listener to show the communication
|
||||
// works across connections although this example would
|
||||
// work fine with just one connection.
|
||||
|
||||
Connection lConn = DriverManager.getConnection(url,"test","");
|
||||
Connection nConn = DriverManager.getConnection(url,"test","");
|
||||
|
||||
// Create two threads, one to issue notifications and
|
||||
// the other to receive them.
|
||||
|
||||
Listener listener = new Listener(lConn);
|
||||
Notifier notifier = new Notifier(nConn);
|
||||
listener.start();
|
||||
notifier.start();
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<pre><code>
|
||||
class Listener extends Thread
|
||||
{
|
||||
private Connection conn;
|
||||
private org.postgresql.PGConnection pgconn;
|
||||
|
||||
Listener(Connection conn) throws SQLException
|
||||
{
|
||||
this.conn = conn;
|
||||
this.pgconn = conn.unwrap(org.postgresql.PGConnection.class);
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.execute("LISTEN mymessage");
|
||||
stmt.close();
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
// issue a dummy query to contact the backend
|
||||
// and receive any pending notifications.
|
||||
|
||||
Statement stmt = conn.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT 1");
|
||||
rs.close();
|
||||
stmt.close();
|
||||
|
||||
org.postgresql.PGNotification notifications[] = pgconn.getNotifications();
|
||||
|
||||
if (notifications != null)
|
||||
{
|
||||
for (int i=0; i<notifications.length; i++)
|
||||
System.out.println("Got notification: " + notifications[i].getName());
|
||||
}
|
||||
|
||||
// wait a while before checking again for new
|
||||
// notifications
|
||||
|
||||
Thread.sleep(500);
|
||||
}
|
||||
catch (SQLException sqle)
|
||||
{
|
||||
sqle.printStackTrace();
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
ie.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<pre><code>
|
||||
class Notifier extends Thread
|
||||
{
|
||||
private Connection conn;
|
||||
|
||||
public Notifier(Connection conn)
|
||||
{
|
||||
this.conn = conn;
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.execute("NOTIFY mymessage");
|
||||
stmt.close();
|
||||
Thread.sleep(2000);
|
||||
}
|
||||
catch (SQLException sqle)
|
||||
{
|
||||
sqle.printStackTrace();
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
ie.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</code></pre>
|
47
docs/documentation/92/load.md
Normal file
47
docs/documentation/92/load.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Loading the Driver
|
||||
header: Chapter 3. Initializing the Driver
|
||||
resource: media
|
||||
previoustitle: Chapter 3. Initializing the Driver
|
||||
previous: use.html
|
||||
nexttitle: Connecting to the Database
|
||||
next: connect.html
|
||||
---
|
||||
|
||||
Before you can connect to a database, you need to load the driver. There are two
|
||||
methods available, and it depends on your code which is the best one to use.
|
||||
|
||||
In the first method, your code implicitly loads the driver using the `Class.forName()`
|
||||
method. For PostgreSQL™, you would use:
|
||||
|
||||
Class.forName("org.postgresql.Driver");
|
||||
|
||||
This will load the driver, and while loading, the driver will automatically
|
||||
register itself with JDBC.
|
||||
|
||||
### Note
|
||||
|
||||
The `forName()` method can throw a `ClassNotFoundException` if the driver is not
|
||||
available.
|
||||
|
||||
This is the most common method to use, but restricts your code to use just PostgreSQL™.
|
||||
If your code may access another database system in the future, and you do not
|
||||
use any PostgreSQL™-specific extensions, then the second method is advisable.
|
||||
|
||||
The second method passes the driver as a parameter to the JVM as it starts, using
|
||||
the `-D` argument. Example:
|
||||
|
||||
`java -Djdbc.drivers=org.postgresql.Driver example.ImageViewer`
|
||||
|
||||
In this example, the JVM will attempt to load the driver as part of its initialization.
|
||||
Once done, the ImageViewer is started.
|
||||
|
||||
Now, this method is the better one to use because it allows your code to be used
|
||||
with other database packages without recompiling the code. The only thing that
|
||||
would also change is the connection URL, which is covered next.
|
||||
|
||||
One last thing: When your code then tries to open a `Connection`, and you get a
|
||||
No driver available `SQLException` being thrown, this is probably caused by the
|
||||
driver not being in the class path, or the value in the parameter not being
|
||||
correct.
|
450
docs/documentation/92/media/css/docs.css
Normal file
450
docs/documentation/92/media/css/docs.css
Normal file
@ -0,0 +1,450 @@
|
||||
/* PostgreSQL.org Documentation Style */
|
||||
|
||||
@import url("global.css");
|
||||
@import url("table.css");
|
||||
@import url("text.css");
|
||||
|
||||
body {
|
||||
font-size: 76%;
|
||||
}
|
||||
|
||||
div.NAVHEADER table {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Container Definitions */
|
||||
|
||||
#docContainerWrap {
|
||||
text-align: center; /* Win IE5 */
|
||||
}
|
||||
|
||||
#docContainer {
|
||||
margin: 0 auto;
|
||||
width: 90%;
|
||||
padding-bottom: 2em;
|
||||
display: block;
|
||||
text-align: left; /* Win IE5 */
|
||||
}
|
||||
|
||||
#docHeader {
|
||||
background-image: url("../img/docs/bg_hdr.png");
|
||||
height: 83px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#docHeaderLogo {
|
||||
position: relative;
|
||||
width: 206px;
|
||||
height: 83px;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
margin: 0 0 0 20px;
|
||||
}
|
||||
|
||||
#docHeaderLogo img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#docNavSearchContainer {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
#docNav, #docVersions {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
color: #666;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
#docSearch {
|
||||
position: relative;
|
||||
text-align: right;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#docTextSize {
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
margin-top: 7px;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
#docSearch form {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
right: 0;
|
||||
margin: 0; /* need for IE 5.5 OSX */
|
||||
text-align: right; /* need for IE 5.5 OSX */
|
||||
white-space: nowrap; /* for Opera */
|
||||
}
|
||||
|
||||
#docSearch form label {
|
||||
color: #666;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
#docSearch form input {
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
#docSearch form #submit {
|
||||
font-size: 0.95em;
|
||||
background: #7A7A7A;
|
||||
color: #fff;
|
||||
border: 1px solid #7A7A7A;
|
||||
padding: 1px 4px;
|
||||
}
|
||||
|
||||
#docSearch form #q {
|
||||
width: 170px;
|
||||
font-size: 0.95em;
|
||||
border: 1px solid #7A7A7A;
|
||||
background: #E1E1E1;
|
||||
color: #000000;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.frmDocSearch {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.inpDocSearch {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#docContent {
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
#docFooter {
|
||||
position: relative;
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
line-height: 1.3em;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#docComments {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#docClear {
|
||||
clear: both;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Heading Definitions */
|
||||
|
||||
h1, h2, h3 {
|
||||
font-weight: bold;
|
||||
margin-top: 2ex;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em !important;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
h1 a:hover {
|
||||
color: #EC5800;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h2 a:hover,
|
||||
h3 a:hover,
|
||||
h4 a:hover {
|
||||
color: #666666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Text Styles */
|
||||
|
||||
div.SECT2 {
|
||||
margin-top: 4ex;
|
||||
}
|
||||
|
||||
div.SECT3 {
|
||||
margin-top: 3ex;
|
||||
margin-left: 3ex;
|
||||
}
|
||||
|
||||
.txtCurrentLocation {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p, ol, ul, li {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.txtCommentsWrap {
|
||||
border: 2px solid #F5F5F5;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.txtCommentsContent {
|
||||
background: #F5F5F5;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.txtCommentsPoster {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.txtCommentsDate {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.txtCommentsComment {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#docContainer p code,
|
||||
#docContainer ul code,
|
||||
#docContainer pre code,
|
||||
#docContainer pre tt,
|
||||
#docContainer pre pre,
|
||||
#docContainer tt tt,
|
||||
#docContainer tt code,
|
||||
#docContainer tt pre {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
pre.LITERALLAYOUT,
|
||||
.SCREEN,
|
||||
.SYNOPSIS,
|
||||
.PROGRAMLISTING,
|
||||
.REFSYNOPSISDIV p,
|
||||
table.CAUTION,
|
||||
table.WARNING,
|
||||
blockquote.NOTE,
|
||||
blockquote.TIP,
|
||||
table.CALSTABLE {
|
||||
-moz-box-shadow: 3px 3px 5px #DFDFDF;
|
||||
-webkit-box-shadow: 3px 3px 5px #DFDFDF;
|
||||
-khtml-box-shadow: 3px 3px 5px #DFDFDF;
|
||||
-o-box-shadow: 3px 3px 5px #DFDFDF;
|
||||
box-shadow: 3px 3px 5px #DFDFDF;
|
||||
}
|
||||
|
||||
pre.LITERALLAYOUT,
|
||||
.SCREEN,
|
||||
.SYNOPSIS,
|
||||
.PROGRAMLISTING,
|
||||
.REFSYNOPSISDIV p,
|
||||
table.CAUTION,
|
||||
table.WARNING,
|
||||
blockquote.NOTE,
|
||||
blockquote.TIP {
|
||||
color: black;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
padding: 2ex;
|
||||
margin: 2ex 0 2ex 2ex;
|
||||
overflow: auto;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
-khtml-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
pre.LITERALLAYOUT,
|
||||
pre.SYNOPSIS,
|
||||
pre.PROGRAMLISTING,
|
||||
.REFSYNOPSISDIV p,
|
||||
.SCREEN {
|
||||
border-color: #CFCFCF;
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
blockquote.NOTE,
|
||||
blockquote.TIP {
|
||||
border-color: #DBDBCC;
|
||||
background-color: #EEEEDD;
|
||||
padding: 14px;
|
||||
width: 572px;
|
||||
}
|
||||
|
||||
blockquote.NOTE,
|
||||
blockquote.TIP,
|
||||
table.CAUTION,
|
||||
table.WARNING {
|
||||
margin: 4ex auto;
|
||||
}
|
||||
|
||||
blockquote.NOTE p,
|
||||
blockquote.TIP p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
blockquote.NOTE pre,
|
||||
blockquote.NOTE code,
|
||||
blockquote.TIP pre,
|
||||
blockquote.TIP code {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-khtml-box-shadow: none;
|
||||
-o-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.emphasis,
|
||||
.c2 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.REPLACEABLE {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Table Styles */
|
||||
|
||||
table {
|
||||
margin-left: 2ex;
|
||||
}
|
||||
|
||||
table.CALSTABLE td,
|
||||
table.CALSTABLE th,
|
||||
table.CAUTION td,
|
||||
table.CAUTION th,
|
||||
table.WARNING td,
|
||||
table.WARNING th {
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
table.CALSTABLE,
|
||||
table.CAUTION,
|
||||
table.WARNING {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.CALSTABLE
|
||||
{
|
||||
margin: 2ex 0 2ex 2ex;
|
||||
background-color: #E0ECEF;
|
||||
border: 2px solid #A7C6DF;
|
||||
}
|
||||
|
||||
table.CALSTABLE tr:hover td
|
||||
{
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
|
||||
table.CALSTABLE td {
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
table.CALSTABLE td,
|
||||
table.CALSTABLE th {
|
||||
border: 1px solid #A7C6DF;
|
||||
padding: 0.5ex 0.5ex;
|
||||
}
|
||||
|
||||
table.CAUTION,
|
||||
table.WARNING {
|
||||
border-collapse: separate;
|
||||
display: block;
|
||||
padding: 0;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
table.CAUTION {
|
||||
background-color: #F5F5DC;
|
||||
border-color: #DEDFA7;
|
||||
}
|
||||
|
||||
table.WARNING {
|
||||
background-color: #FFD7D7;
|
||||
border-color: #DF421E;
|
||||
}
|
||||
|
||||
table.CAUTION td,
|
||||
table.CAUTION th,
|
||||
table.WARNING td,
|
||||
table.WARNING th {
|
||||
border-width: 0;
|
||||
padding-left: 2ex;
|
||||
padding-right: 2ex;
|
||||
}
|
||||
|
||||
table.CAUTION td,
|
||||
table.CAUTION th {
|
||||
border-color: #F3E4D5
|
||||
}
|
||||
|
||||
table.WARNING td,
|
||||
table.WARNING th {
|
||||
border-color: #FFD7D7;
|
||||
}
|
||||
|
||||
td.c1,
|
||||
td.c2,
|
||||
td.c3,
|
||||
td.c4,
|
||||
td.c5,
|
||||
td.c6 {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
border-bottom: 0px solid #FFEFEF;
|
||||
padding: 1ex 2ex 0;
|
||||
}
|
||||
|
||||
/* Link Styles */
|
||||
|
||||
#docNav a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:visited,
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:active {
|
||||
color:#0066A2;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color:#004E66;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
#docFooter a:link,
|
||||
#docFooter a:visited,
|
||||
#docFooter a:active {
|
||||
color:#666;
|
||||
}
|
||||
|
||||
#docContainer code.FUNCTION tt {
|
||||
font-size: 1em;
|
||||
}
|
98
docs/documentation/92/media/css/global.css
Normal file
98
docs/documentation/92/media/css/global.css
Normal file
@ -0,0 +1,98 @@
|
||||
/*
|
||||
PostgreSQL.org - Global Styles
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: verdana, sans-serif;
|
||||
font-size: 69%;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.4em;
|
||||
font-weight: bold;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
margin: 1.2em 0em 1.2em 0em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.0em;
|
||||
margin: 1.2em 0em 1.2em 0em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 0.95em;
|
||||
margin: 1.2em 0em 1.2em 0em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 0.9em;
|
||||
margin: 1.2em 0em 1.2em 0em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 0.85em;
|
||||
margin: 1.2em 0em 1.2em 0em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
ol, ul, li {/*
|
||||
list-style: none;*/
|
||||
font-size: 1.0em;
|
||||
line-height: 1.2em;
|
||||
margin-top: 0.2em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.0em;
|
||||
line-height: 1.2em;
|
||||
margin: 1.2em 0em;
|
||||
}
|
||||
|
||||
td p {
|
||||
margin: 0em 0em 1.2em;
|
||||
}
|
||||
|
||||
li > p {
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: monospace;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
div#pgContentWrap code {
|
||||
font-size: 1.2em;
|
||||
padding: 1em;
|
||||
margin: 2ex 0 2ex 2ex;
|
||||
background: #F7F7F7;
|
||||
border: 1px solid #CFCFCF;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
-khtml-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
strong, b {
|
||||
font-weight: bold;
|
||||
}
|
101
docs/documentation/92/media/css/table.css
Normal file
101
docs/documentation/92/media/css/table.css
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
PostgreSQL.org - Table Styles
|
||||
*/
|
||||
|
||||
div.tblBasic h2 {
|
||||
margin: 25px 0 .5em 0;
|
||||
}
|
||||
|
||||
div.tblBasic table {
|
||||
background: #F5F5F5 url(../img/layout/nav_tbl_top_lft.png) top left no-repeat;
|
||||
margin-left: 2ex;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
div.tblBasic table th {
|
||||
padding-top: 20px;
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
div.tblBasic table td {
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
}
|
||||
|
||||
div.tblBasic table th,
|
||||
div.tblBasic table td {
|
||||
padding: 8px 11px;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
div.tblBasic table td.indented {
|
||||
text-indent: 30px;
|
||||
}
|
||||
|
||||
div.tblBasic table.tblCompact td {
|
||||
padding: 3px 3px;
|
||||
}
|
||||
|
||||
div.tblBasic table tr.lastrow td {
|
||||
border-bottom: none;
|
||||
padding-bottom: 13px;
|
||||
}
|
||||
|
||||
div.tblBasic table.tblCompact tr.lastrow td {
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
div.tblBasic table tr.lastrow td.colFirstT,
|
||||
div.tblBasic table tr.lastrow td.colFirst {
|
||||
background: url(../img/layout/nav_tbl_btm_lft.png) bottom left no-repeat;
|
||||
}
|
||||
|
||||
div.tblBasic table.tblBasicGrey th.colLast,
|
||||
div.tblBasic table.tblCompact th.colLast {
|
||||
background: #F5F5F5 url(../img/layout/nav_tbl_top_rgt.png) top right no-repeat;
|
||||
}
|
||||
|
||||
div.tblBasic table.tblBasicGrey tr.lastrow td.colLastT,
|
||||
div.tblBasic table.tblBasicGrey tr.lastrow td.colLast,
|
||||
div.tblBasic table.tblCompact tr.lastrow td.colLast,
|
||||
div.tblBasic table.tblCompact tr.lastrow td.colLastT{
|
||||
background: #F5F5F5 url(../img/layout/nav_tbl_btm_rgt.png) bottom right no-repeat;
|
||||
}
|
||||
|
||||
div.tblBasic table.tblBasicGrey tr.firstrow td.colLastT,
|
||||
div.tblBasic table.tblBasicGrey tr.firstrow td.colLast,
|
||||
div tblBasic table.tblCompact tr.firstrow td.colLast {
|
||||
background: #F5F5F5 url(../img/layout/nav_tbl_top_rgt.png) top right no-repeat;
|
||||
}
|
||||
|
||||
div.tblBasic table th.colMid,
|
||||
div.tblBasic table td.colMid,
|
||||
div.tblBasic table th.colLast,
|
||||
div.tblBasic table td.colLast {
|
||||
background-color: #F5F5F5 ;
|
||||
}
|
||||
|
||||
div.tblBasic table th.colLastC,
|
||||
div.tblBasic table td.colFirstC,
|
||||
div.tblBasic table td.colLastC {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.tblBasic table th.colLastR,
|
||||
div.tblBasic table td.colFirstR,
|
||||
div.tblBasic table td.colLastR {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.tblBasic table td.colFirstT,
|
||||
div.tblBasic table td.colMidT,
|
||||
div.tblBasic table td.colLastT {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
div.tblBasic table th.colLastRT,
|
||||
div.tblBasic table td.colFirstRT,
|
||||
div.tblBasic table td.colLastRT {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
162
docs/documentation/92/media/css/text.css
Normal file
162
docs/documentation/92/media/css/text.css
Normal file
@ -0,0 +1,162 @@
|
||||
/*
|
||||
PostgreSQL.org - Text Styles
|
||||
*/
|
||||
|
||||
/* Heading Definitions */
|
||||
|
||||
h1 {
|
||||
color: #EC5800;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Text Styles */
|
||||
|
||||
.txtColumn1 {
|
||||
width: 50%;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
.txtColumn2 {
|
||||
width: 50%;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.txtCurrentLocation {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.txtDivider {
|
||||
font-size: 0.8em;
|
||||
color: #E1E1E1;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.txtNewsEvent {
|
||||
font-size: 0.9em;
|
||||
color: #0094C7;
|
||||
}
|
||||
|
||||
.txtDate {
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.txtMediumGrey {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.txtFormLabel {
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.txtRequiredField {
|
||||
color: #EC5800;
|
||||
}
|
||||
|
||||
.txtImportant {
|
||||
color: #EC5800;
|
||||
}
|
||||
|
||||
.txtOffScreen {
|
||||
position: absolute;
|
||||
left: -1999px;
|
||||
width: 1990px;
|
||||
}
|
||||
|
||||
#txtFrontFeatureHeading {
|
||||
padding-bottom: 1.1em;
|
||||
}
|
||||
|
||||
#txtFrontFeatureLink a {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#txtFrontUserText {
|
||||
font-size: 1.0em;
|
||||
color: #666;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#txtFrontUserName {
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
margin-top: 9px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#txtFrontUserLink {
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
margin-top: 11px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
#txtFrontUserLink img {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#txtFrontSupportUsText {
|
||||
font-size: 1.0em;
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
#txtFrontSupportUsLink {
|
||||
font-size: 0.9em;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#txtFrontSupportUsLink img {
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
/* Link Styles */
|
||||
|
||||
a:link { color:#0085B0; text-decoration: underline; }
|
||||
a:visited { color:#004E66; text-decoration: underline; }
|
||||
a:active { color:#0085B0; text-decoration: underline; }
|
||||
a:hover { color:#000000; text-decoration: underline; }
|
||||
|
||||
#pgFooter a:link { color:#666; text-decoration: underline; }
|
||||
#pgFooter a:visited { color:#666; text-decoration: underline; }
|
||||
#pgFooter a:active { color:#666; text-decoration: underline; }
|
||||
#pgFooter a:hover { color:#000000; text-decoration: underline; }
|
||||
|
||||
#txtFrontUserName a:link { color:#666; text-decoration: underline; }
|
||||
#txtFrontUserName a:visited { color:#666; text-decoration: underline; }
|
||||
#txtFrontUserName a:active { color:#666; text-decoration: underline; }
|
||||
#txtFrontUserName a:hover { color:#000; text-decoration: underline; }
|
||||
|
||||
#txtArchives a:visited { color:#00536E; text-decoration: underline; }
|
||||
#txtArchives pre { word-wrap: break-word; font-size: 150%; }
|
||||
#txtArchives tt { word-wrap: break-word; font-size: 150%; }
|
||||
|
||||
#pgFrontUSSContainer h2, #pgFrontUSSContainer h3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#pgFrontNewsEventsContainer h2, #pgFrontNewsEventsContainer h3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#pgFrontNewsEventsContainer h3 img {
|
||||
margin-bottom: 10px;
|
||||
}
|
BIN
docs/documentation/92/media/favicon.ico
Normal file
BIN
docs/documentation/92/media/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
docs/documentation/92/media/img/docs/bg_hdr.png
Normal file
BIN
docs/documentation/92/media/img/docs/bg_hdr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
BIN
docs/documentation/92/media/img/layout/hdr_left3a.png
Normal file
BIN
docs/documentation/92/media/img/layout/hdr_left3a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
BIN
docs/documentation/92/media/img/layout/nav_tbl_btm.png
Normal file
BIN
docs/documentation/92/media/img/layout/nav_tbl_btm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 218 B |
BIN
docs/documentation/92/media/img/layout/nav_tbl_top.png
Normal file
BIN
docs/documentation/92/media/img/layout/nav_tbl_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 B |
17
docs/documentation/92/outer-joins-escape.md
Normal file
17
docs/documentation/92/outer-joins-escape.md
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Escape for outer joins
|
||||
header: Chapter 8. JDBC escapes
|
||||
resource: media
|
||||
previoustitle: Chapter 8. JDBC escapes
|
||||
previous: escapes.html
|
||||
nexttitle: Date-time escapes
|
||||
next: escapes-datetime.html
|
||||
---
|
||||
|
||||
You can specify outer joins using the following syntax: `{oj table (LEFT|RIGHT|FULL) OUTER JOIN (table | outer-join)
|
||||
ON search-condition }`
|
||||
|
||||
For example :
|
||||
|
||||
`rs = stmt.executeQuery( "select * from {oj a left outer join b on (a.i=b.i)} ");`
|
25
docs/documentation/92/prepare.md
Normal file
25
docs/documentation/92/prepare.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Preparing the Database Server for JDBC
|
||||
header: Chapter 2. Setting up the JDBC Driver
|
||||
resource: media
|
||||
previoustitle: Setting up the Class Path
|
||||
previous: classpath.html
|
||||
nexttitle: Creating a Database
|
||||
next: your-database.html
|
||||
---
|
||||
|
||||
Because Java does not support using unix sockets the PostgreSQL™ server must be
|
||||
configured to allow TCP/IP connections. Starting with server version 8.0 TCP/IP
|
||||
connections are allowed from `localhost`. To allow connections to other interfaces
|
||||
than the loopback interface, you must modify the `postgresql.conf` file's `listen_addresses`
|
||||
setting.
|
||||
|
||||
For server versions prior to 8.0 the server does not listen on any interface by
|
||||
default, and you must set `tcpip_socket = true` in the `postgresql.conf` file.
|
||||
|
||||
Once you have made sure the server is correctly listening for TCP/IP connections
|
||||
the next step is to verify that users are allowed to connect to the server. Client
|
||||
authentication is setup in `pg_hba.conf`. Refer to the main PostgreSQL™ documentation
|
||||
for details. The JDBC driver supports the `trust`, `ident`, `password`, `md5`, and
|
||||
`crypt` authentication methods.
|
113
docs/documentation/92/query.md
Normal file
113
docs/documentation/92/query.md
Normal file
@ -0,0 +1,113 @@
|
||||
---
|
||||
layout: default_docs
|
||||
title: Chapter 5. Issuing a Query and Processing the Result
|
||||
header: Chapter 5. Issuing a Query and Processing the Result
|
||||
resource: media
|
||||
previoustitle: Custom SSLSocketFactory
|
||||
previous: ssl-factory.html
|
||||
nexttitle: Using the Statement or PreparedStatement Interface
|
||||
next: statement.html
|
||||
---
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
* [Getting results based on a cursor](query.html#query-with-cursor)
|
||||
* [Using the `Statement` or `PreparedStatement` Interface](statement.html)
|
||||
* [Using the `ResultSet` Interface](resultset.html)
|
||||
* [Performing Updates](update.html)
|
||||
* [Creating and Modifying Database Objects](ddl.html)
|
||||
|
||||
Any time you want to issue SQL statements to the database, you require a `Statement`
|
||||
or `PreparedStatement` instance. Once you have a `Statement` or `PreparedStatement`,
|
||||
you can use issue a query. This will return a `ResultSet` instance, which contains
|
||||
the entire result (see the section called [“Getting results based on a cursor”](query.html#query-with-cursor)
|
||||
here for how to alter this behaviour). [Example 5.1, “Processing a Simple Query in JDBC”](query.html#query-example)
|
||||
illustrates this process.
|
||||
|
||||
<a name="query-example"></a>
|
||||
**Example 5.1. Processing a Simple Query in JDBC**
|
||||
|
||||
This example will issue a simple query and print out the first column of each
|
||||
row using a `Statement`.
|
||||
|
||||
`Statement st = conn.createStatement();`
|
||||
`ResultSet rs = st.executeQuery("SELECT * FROM mytable WHERE columnfoo = 500");`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`System.out.print("Column 1 returned ");`
|
||||
`System.out.println(rs.getString(1));`
|
||||
`}`
|
||||
`rs.close();`
|
||||
`st.close();`
|
||||
|
||||
This example issues the same query as before but uses a `PreparedStatement` and
|
||||
a bind value in the query.
|
||||
|
||||
`int foovalue = 500;`
|
||||
`PreparedStatement st = conn.prepareStatement("SELECT * FROM mytable WHERE columnfoo = ?");`
|
||||
`st.setInt(1, foovalue);`
|
||||
`ResultSet rs = st.executeQuery();`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`System.out.print("Column 1 returned ");`
|
||||
`System.out.println(rs.getString(1));`
|
||||
`}`
|
||||
`rs.close();`
|
||||
`st.close();`
|
||||
|
||||
<a name="query-with-cursor"></a>
|
||||
# Getting results based on a cursor
|
||||
|
||||
By default the driver collects all the results for the query at once. This can
|
||||
be inconvenient for large data sets so the JDBC driver provides a means of basing
|
||||
a `ResultSet` on a database cursor and only fetching a small number of rows.
|
||||
|
||||
A small number of rows are cached on the client side of the connection and when
|
||||
exhausted the next block of rows is retrieved by repositioning the cursor.
|
||||
|
||||
### Note
|
||||
|
||||
> Cursor based `ResultSets` cannot be used in all situations. There a number of
|
||||
restrictions which will make the driver silently fall back to fetching the
|
||||
whole `ResultSet` at once.
|
||||
|
||||
* The connection to the server must be using the V3 protocol. This is the default
|
||||
for (and is only supported by) server versions 7.4 and later.
|
||||
* The `Connection` must not be in autocommit mode. The backend closes cursors at
|
||||
the end of transactions, so in autocommit mode the backend will have
|
||||
closed the cursor before anything can be fetched from it.
|
||||
*The `Statement` must be created with a `ResultSet` type of `ResultSet.TYPE_FORWARD_ONLY`.
|
||||
This is the default, so no code will need to be rewritten to take advantage
|
||||
of this, but it also means that you cannot scroll backwards or otherwise
|
||||
jump around in the `ResultSet`.
|
||||
* The query given must be a single statement, not multiple statements strung
|
||||
together with semicolons.
|
||||
|
||||
<a name="fetchsize-example"></a>
|
||||
**Example 5.2. Setting fetch size to turn cursors on and off.**
|
||||
|
||||
Changing code to cursor mode is as simple as setting the fetch size of the
|
||||
`Statement` to the appropriate size. Setting the fetch size back to 0 will cause
|
||||
all rows to be cached (the default behaviour).
|
||||
|
||||
`// make sure autocommit is off`
|
||||
`conn.setAutoCommit(false);`
|
||||
`Statement st = conn.createStatement();`<br /><br />
|
||||
`// Turn use of the cursor on.`
|
||||
`st.setFetchSize(50);`
|
||||
`ResultSet rs = st.executeQuery("SELECT * FROM mytable");`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`System.out.print("a row was returned.");`
|
||||
`}`
|
||||
`rs.close();`<br /><br />
|
||||
`// Turn the cursor off.`
|
||||
`st.setFetchSize(0);`
|
||||
`rs = st.executeQuery("SELECT * FROM mytable");`
|
||||
`while (rs.next())`
|
||||
`{`
|
||||
`System.out.print("many rows were returned.");`
|
||||
`}`
|
||||
`rs.close();`<br /><br />
|
||||
`// Close the statement.`
|
||||
`st.close();`
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user