Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Parameterized commands with double infinite values fail #337

Copy link
Copy link
@danports

Description

@danports
Issue body actions

Npgsql is sending "Infinity" or "-Infinity" to the server instead of 'Infinity' or '-Infinity' (double quotes instead of single quotes), which causes the server to return "ERROR: 42703: column "infinity" does not exist."

To reproduce:

using (var connection = new NpgsqlConnection("..."))
{
    connection.Open();
    using (var command = new NpgsqlCommand("CREATE TABLE test (value DOUBLE PRECISION NOT NULL)", connection))
    {
        command.ExecuteNonQuery();
    }
    using (var command = new NpgsqlCommand(@"INSERT INTO test (value) VALUES (@value)", connection))
    {
        command.Parameters.AddWithValue("value", double.PositiveInfinity);
        command.ExecuteNonQuery();
    }
}

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.