Permalink
Browse files

Merge branch 'hotfix/3.1.9'

  • Loading branch information...
roji committed Nov 20, 2016
2 parents 1855047 + 21fc7b6 commit 27ff2c42fda80c5b3b688e12571bef1cbf7d83f3
Showing with 1,772 additions and 149 deletions.
  1. +6 −15 .teamcity/npgsql/buildTypes/npgsql_CompileReleaseAndPush.xml
  2. +6 −0 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_RunTestsOnLinuxCoreCLR.xml
  3. +0 −16 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL91.xml
  4. +1 −1 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL92.xml
  5. +1 −1 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL93.xml
  6. +1 −1 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL94.xml
  7. +1 −1 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL95.xml
  8. +1 −1 .teamcity/npgsql_TestOnLinuxCoreCLR/buildTypes/npgsql_TestLinuxCoreCLROnPostgreSQL96.xml
  9. +6 −0 .teamcity/npgsql_TestOnLinuxMono/buildTypes/npgsql_RunTestsOnLinuxMono.xml
  10. +1 −1 .teamcity/npgsql_TestOnLinuxMono/buildTypes/npgsql_TestLinuxMonoOnPostgreSQL95.xml
  11. +6 −0 .teamcity/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_RunTestsOnWindowsNetFramework.xml
  12. +0 −16 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL91.xml
  13. +1 −1 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL92.xml
  14. +1 −1 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL93.xml
  15. +1 −1 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL94.xml
  16. +1 −1 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL95.xml
  17. +1 −1 ...ty/npgsql_TestOnWindowsNetFramework/buildTypes/npgsql_TestOnWindowsNetFrameworkOnPostgreSQL96.xml
  18. +77 −0 doc/compatibility.md
  19. +67 −0 doc/connection-string-parameters.md
  20. +100 −0 doc/copy.md
  21. +403 −0 doc/ddex.md
  22. +53 −0 doc/faq.md
  23. +58 −0 doc/index.md
  24. +18 −0 doc/keepalive.md
  25. +36 −0 doc/large-objects.md
  26. +95 −0 doc/logging.md
  27. +111 −0 doc/migration/3.0.md
  28. +35 −0 doc/migration/3.1.md
  29. +48 −0 doc/security.md
  30. +17 −0 doc/toc.md
  31. +179 −0 doc/types/basic.md
  32. +90 −0 doc/types/datetime.md
  33. +75 −0 doc/types/enums_and_composites.md
  34. +43 −0 doc/wait.md
  35. +4 −1 global.json
  36. +3 −3 src/CommonAssemblyInfo.cs
  37. +23 −5 src/Npgsql/GeneratedAsync.cs
  38. +4 −11 src/Npgsql/NpgsqlConnection.cs
  39. +25 −3 src/Npgsql/NpgsqlConnectionStringBuilder.cs
  40. +1 −0 src/Npgsql/NpgsqlConnector.cs
  41. +2 −1 src/Npgsql/NpgsqlDataReader.cs
  42. +6 −13 src/Npgsql/NpgsqlParameter.cs
  43. +3 −1 src/Npgsql/ReadBuffer.cs
  44. +6 −6 src/Npgsql/Schema/DbColumnSchemaGenerator.cs
  45. +5 −3 src/Npgsql/TypeHandlerRegistry.cs
  46. +19 −12 src/Npgsql/TypeHandlers/CompositeHandler.cs
  47. +28 −0 src/Npgsql/TypeHandlers/PostgisGeometryHandler.cs
  48. +2 −2 src/Npgsql/project.json
  49. +1 −1 teamcity_set_version.cmd
  50. +3 −1 test/Npgsql.Tests/CommandTests.cs
  51. +14 −0 test/Npgsql.Tests/ConnectionStringBuilderTests.cs
  52. +18 −9 test/Npgsql.Tests/ConnectionTests.cs
  53. +30 −11 test/Npgsql.Tests/ReaderNewSchemaTests.cs
  54. +1 −1 test/Npgsql.Tests/ReaderOldSchemaTests.cs
  55. +10 −6 test/Npgsql.Tests/Types/CompositeTests.cs
  56. +11 −1 test/Npgsql.Tests/Types/MiscTypeTests.cs
  57. +13 −0 test/Npgsql.Tests/Types/PostgisTests.cs
@@ -13,6 +13,12 @@
<param name="system.Configuration" value="%Configuration%" />
</parameters>
<build-runners>
<runner id="RUNNER_45" name="Restore" type="dotnet">
<parameters>
<param name="dotnet-command" value="restore" />
<param name="teamcity.step.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_15" name="Build (Release)" type="dotnet">
<parameters>
<param name="dotnet-build-config" value="%Configuration%" />
@@ -90,14 +96,6 @@
</dependency>
</artifact-dependencies>
<dependencies>
<depend-on sourceBuildTypeId="npgsql_TestOnWindowsNetFrameworkOnPostgreSQL91">
<options>
<option name="run-build-if-dependency-failed" value="CANCEL" />
<option name="run-build-if-dependency-failed-to-start" value="CANCEL" />
<option name="take-started-build-with-same-revisions" value="true" />
<option name="take-successful-builds-only" value="true" />
</options>
</depend-on>
<depend-on sourceBuildTypeId="npgsql_TestOnWindowsNetFrameworkOnPostgreSQL92">
<options>
<option name="run-build-if-dependency-failed" value="CANCEL" />
@@ -146,13 +144,6 @@
<option name="take-successful-builds-only" value="true" />
</options>
</depend-on>
<depend-on sourceBuildTypeId="npgsql_TestLinuxCoreCLROnPostgreSQL91">
<options>
<option name="run-build-if-dependency-failed" value="RUN_ADD_PROBLEM" />
<option name="take-started-build-with-same-revisions" value="true" />
<option name="take-successful-builds-only" value="true" />
</options>
</depend-on>
<depend-on sourceBuildTypeId="npgsql_TestLinuxCoreCLROnPostgreSQL92">
<options>
<option name="run-build-if-dependency-failed" value="RUN_ADD_PROBLEM" />
@@ -8,6 +8,12 @@
</options>
<parameters />
<build-runners>
<runner id="RUNNER_42" name="Restore" type="dotnet">
<parameters>
<param name="dotnet-command" value="restore" />
<param name="teamcity.step.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_35" name="Test" type="simpleRunner">
<parameters>
<param name="command.executable" value="dotnet" />
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<build-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uuid="524aaf69-c29e-446c-84d0-4015e56cd33d" xsi:noNamespaceSchemaLocation="http://www.jetbrains.com/teamcity/schemas/10.0/project-config.xsd">
<name>Test Linux/CoreCLR on PostgreSQL 9.1</name>
<description />
<settings ref="npgsql_RunTestsOnLinuxCoreCLR">
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5491" />
</parameters>
<build-runners order="RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
<cleanup />
</settings>
</build-type>
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5492" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_42, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5493" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_42, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5494" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_42, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5495" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_42, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5496" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_42, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -8,6 +8,12 @@
</options>
<parameters />
<build-runners>
<runner id="RUNNER_44" name="Restore" type="dotnet">
<parameters>
<param name="dotnet-command" value="restore" />
<param name="teamcity.step.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_35" name="Test" type="simpleRunner">
<parameters>
<param name="command.executable" value="dotnet" />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;Username=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests;Port=5495" />
</parameters>
<build-runners order="RUNNER_35" />
<build-runners order="RUNNER_44, RUNNER_35" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -8,6 +8,12 @@
</options>
<parameters />
<build-runners>
<runner id="RUNNER_43" name="Restore" type="dotnet">
<parameters>
<param name="dotnet-command" value="restore" />
<param name="teamcity.step.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_18" name="Test" type="simpleRunner">
<parameters>
<param name="command.executable" value="dotnet" />
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<build-type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uuid="0683dc8b-9c13-4486-83b1-1a360b959fca" xsi:noNamespaceSchemaLocation="http://www.jetbrains.com/teamcity/schemas/10.0/project-config.xsd">
<name>Test on Windows/.NET Framework on PostgreSQL 9.1</name>
<description />
<settings ref="npgsql_RunTestsOnWindowsNetFramework">
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5491;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
<cleanup />
</settings>
</build-type>
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5492;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<build-runners order="RUNNER_43, RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5493;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<build-runners order="RUNNER_43, RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5494;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<build-runners order="RUNNER_43, RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5495;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<build-runners order="RUNNER_43, RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
@@ -6,7 +6,7 @@
<parameters>
<param name="env.NPGSQL_TEST_DB" value="Server=localhost;port=5496;User ID=npgsql_tests;Password=npgsql_tests;Database=npgsql_tests" />
</parameters>
<build-runners order="RUNNER_18" />
<build-runners order="RUNNER_43, RUNNER_18" />
<vcs-settings />
<requirements />
<build-triggers />
View
@@ -0,0 +1,77 @@
# Compatibility Notes
This page centralizes Npgsql's compatibility status with PostgreSQL and other components,
and documents some important gotchas.
We aim to be compatible with all [currently supported PostgreSQL versions](http://www.postgresql.org/support/versioning/), which means 5 years back.
Earlier versions may still work but we don't perform continuous testing on them or commit to resolving issues on them.
## PostgreSQL
We aim to be compatible with all [currently supported PostgreSQL versions](http://www.postgresql.org/support/versioning/), which means 5 years back.
Earlier versions may still work but we don't perform continuous testing on them or commit to resolving issues on them.
## ADO.NET
Npgsql is an ADO.NET-compatible provider, so it has the same APIs as other .NET database drivers and should behave the same.
Please let us know if you notice any non-standard behavior.
## .NET Framework/.NET Core/mono
Npgsql 3.1 targets .NET Framework 4.5 and 4.5.1, as well as the [.NET Standard 1.3](https://github.com/dotnet/corefx) which allows it
to run on .NET Core. It is also tested and runs well on mono.
Here is a sample project.json to get you started with .NET Core:
```json
{
"buildOptions": {
"emitEntryPoint": "true"
},
"dependencies": {
"Npgsql" : "3.1.8"
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.Data": { "version": "4.0.0.0", "type": "build" }
}
},
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
}
}
}
}
}
```
Note that `netcoreapp1.0` can be replaced with `netstandard13` (or up) to create a library.
## Amazon Redshift
Amazon Redshift is a cloud-based data warehouse originally based on PostgreSQL 8.0.2.
In addition, due to its nature some features have been removed and others changed in ways that make them incompatible with PostgreSQL.
We try to support Redshift as much as we can, please let us know about issues you run across.
First, check out Amazon's [page about Redshift and PostgreSQL](http://docs.aws.amazon.com/redshift/latest/dg/c_redshift-and-postgres-sql.html) which
contains lots of useful compatibility information.
Additional known issues:
* If you want to connect over SSL, your connection string must contain `Server Compatibility Mode=Redshift`, otherwise you'll get a connection
error about `ssl_renegotiation_limit`.
* Entity Framework with database-computed identity values don't work with Redshift, since it doesn't support sequences
(see issue [#544](https://github.com/npgsql/npgsql/issues/544)).
## pgbouncer
Npgsql works well with pgbouncer, but there are some quirks to be aware of.
* Don't forget to turn off Npgsql's internal connection pool by specifying `Pooling=false` on the connection string.
* Prior to version 3.1, Npgsql sends the `statement_timeout` startup parameter when it connects, but this parameter isn't supported by pgbouncer.
You can get around this by specifying `CommandTimeout=0` on the connection string, and then manually setting the `CommandTimeout`
property on your `NpgsqlCommand` objects. Version 3.1 no longer sends `statement_timeout`.
@@ -0,0 +1,67 @@
# Connection String Parameters
Parameter keywords are case-insensitive.
## Basic Connection
| Parameter | Description | Default |
|-----------|-------------------------------------------------------------------------|------------------|
| Host | The hostname or IP address of the PostgreSQL server to connect to. | *Required* |
| Port | The TCP port of the PostgreSQL server. | 5432 |
| Database | The PostgreSQL database to connect to. | Same as Username |
| Username | The username to connect with. Not required if using IntegratedSecurity. | |
| Password | The password to connect with. Not required if using IntegratedSecurity. | |
## Security and Encryption
| Parameter | Description | Default |
|--------------------------|-------------------------------------------------------------------------|------------------|
| SSL Mode | Controls whether SSL is used, depending on server support. Can be `Require`, `Disable`, or `Prefer`. [See docs for more info](security.md). | Disable |
| Trust Server Certificate | Whether to trust the server certificate without validating it. [See docs for more info](security.md). | false |
| Use SSL Stream | Npgsql uses its own internal implementation of TLS/SSL. Turn this on to use .NET SslStream instead. | false |
| Integrated Security | Whether to use integrated security to log in (GSS/SSPI), currently supported on Windows only. [See docs for more info](security.md). | false |
| Persist Security Info | Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state. Since 3.1 only. | false |
| Kerberos Service Name | The Kerberos service name to be used for authentication. [See docs for more info](security.md). | postgres |
| Include Realm | The Kerberos realm to be used for authentication. [See docs for more info](security.md). | |
## Pooling
| Parameter | Description | Default |
|-----------|--------------------------------------------------------------|------------------------------|
| Pooling | Whether connection pooling should be used. | true |
| Minimum Pool Size | The minimum connection pool size. | 1 |
| Maximum Pool Size | The maximum connection pool size. | 100 since 3.1, 20 previously |
| Connection Idle Lifetime | The time (in seconds) to wait before closing idle connections in the pool if the count of all connections exceeds MinPoolSize. Since 3.1 only. | 300 |
| Connection Pruning Interval | How many seconds the pool waits before attempting to prune idle connections that are beyond idle lifetime (see `ConnectionIdleLifetime`). Since 3.1 only. | 10 |
## Timeouts and Keepalive
| Parameter | Description | Default |
|--------------------------|--------------------------------------------------------------|------------------------------|
| Timeout | The time to wait (in seconds) while trying to establish a connection before terminating the attempt and generating an error. | 15 |
| Command Timeout | The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. Set to zero for infinity. | 30 |
| Internal Command Timeout | The time to wait (in seconds) while trying to execute a an internal command before terminating the attempt and generating an error. -1 uses CommandTimeout, 0 means no timeout. | -1 |
| Keepalive | The number of seconds of connection inactivity before Npgsql sends a keepalive query. | disabled |
## Performance
| Parameter | Description | Default |
|--------------------------|--------------------------------------------------------------|------------------------------|
| Buffer Size | Determines the size of the internal buffer Npgsql uses when reading or writing. Increasing may improve performance if transferring large values from the database. | 8192 |
## Misc
| Parameter | Description | Default |
|--------------------------|-------------------------------------------------------------------------------------------------|-----------|
| Application Name | The optional application name parameter to be sent to the backend during connection initiation. | |
| Enlist | Whether to enlist in an ambient TransactionScope. | false |
| Search Path | Sets the schema search path. | |
| Client Encoding | Gets or sets the client_encoding parameter. Since 3.1. | |
| EF Template Database | The database template to specify when creating a database in Entity Framework. | template1 |
## Compatibility
| Parameter | Description | Default |
|---------------------------|---------------------------------------------------------------------------------------------------|---------|
| Server Compatibility Mode | A compatibility mode for special PostgreSQL server types. Currently only "Redshift" is supported. | none |
| Convert Infinity DateTime | Makes MaxValue and MinValue timestamps and dates readable as infinity and negative infinity. | false |
Oops, something went wrong.

0 comments on commit 27ff2c4

Please sign in to comment.