Skip to content

Commit

Permalink
Remove PostgreSQL backslash escape leapfrog
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericDelaporte committed May 21, 2024
1 parent b19b522 commit b976585
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 48 deletions.
14 changes: 0 additions & 14 deletions doc/reference/modules/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1527,11 +1527,6 @@ in the parameter binding.</programlisting>
<row>
<entry>PostgreSQL</entry>
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
<entry>
This dialect enables backslash escape sequences by default,
see the <literal>escape_backslash_in_strings</literal> configuration
property.
</entry>
</row>
<row>
<entry>PostgreSQL 8.1</entry>
Expand All @@ -1557,15 +1552,6 @@ in the parameter binding.</programlisting>
This dialect supports <literal>XML</literal> type.
</entry>
</row>
<row>
<entry>PostgreSQL 9.1</entry>
<entry><literal>NHibernate.Dialect.PostgreSQL91Dialect</literal></entry>
<entry>
This dialect disables backslash escape sequences by default
see the <literal>escape_backslash_in_strings</literal> configuration
property.
</entry>
</row>
<row>
<entry>SQLite</entry>
<entry><literal>NHibernate.Dialect.SQLiteDialect</literal></entry>
Expand Down
2 changes: 1 addition & 1 deletion psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Task Set-Configuration {
'PostgreSQL' = @{
'connection.connection_string' = 'Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true';
'connection.driver_class' = 'NHibernate.Driver.NpgsqlDriver';
'dialect' = 'NHibernate.Dialect.PostgreSQL91Dialect'
'dialect' = 'NHibernate.Dialect.PostgreSQL83Dialect'
};
'SQLite' = @{
<#
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/PostgreSQL.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ for your own use before compile tests in VisualStudio.
<property name="connection.connection_string">
Server=localhost;Database=nhibernate;User ID=nhibernate;Password=nhibernate;Enlist=true;
</property>
<property name="dialect">NHibernate.Dialect.PostgreSQL91Dialect</property>
<property name="dialect">NHibernate.Dialect.PostgreSQL83Dialect</property>
</session-factory>
</hibernate-configuration>
10 changes: 0 additions & 10 deletions src/NHibernate.Test/TestDialects/PostgreSQL91TestDialect.cs

This file was deleted.

16 changes: 0 additions & 16 deletions src/NHibernate/Dialect/PostgreSQL91Dialect.cs

This file was deleted.

5 changes: 0 additions & 5 deletions src/NHibernate/Dialect/PostgreSQLDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,6 @@ public override string CurrentTimestampSelectString
get { return "SELECT CURRENT_TIMESTAMP"; }
}

/// <inheritdoc />
/// <remarks><see langword="true" /> by default for PostgreSQL up until version 9.1,
/// <see href="https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE" />.</remarks>
protected override bool EscapeBackslashInStrings { get; set; } = true;

#region Overridden informational metadata

public override bool SupportsEmptyInList => false;
Expand Down
2 changes: 1 addition & 1 deletion teamcity.build
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<target name="setup-teamcity-postgresql">
<property name="db-service" value="postgresql-x64-10" />
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.NpgsqlDriver" />
<property name="nhibernate.dialect" value="NHibernate.Dialect.PostgreSQL91Dialect" />
<property name="nhibernate.dialect" value="NHibernate.Dialect.PostgreSQL83Dialect" />
<property name="nhibernate.connection.connection_string" value="Host=localhost;Port=5432;Database=nhibernate;Username=nhibernate;Password=nhibernate;Enlist=true" />
</target>

Expand Down

0 comments on commit b976585

Please sign in to comment.