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

Possibly undocumented breaking change: ExecuteScalarAsync now returns null instead of DBNull.Value #5467

Copy link
Copy link

Description

@madelson
Issue body actions

Steps to reproduce

See madelson/DistributedLock#174. Essentially, use the DistributedLock.Postgres package and then upgrade to Npgsql 8.

The issue

We are issuing a command like this:

SET LOCAL statement_timeout = 0;
SET LOCAL lock_timeout = 0;

SELECT pg_catalog.pg_advisory_lock(@key) AS result

Retrieving the result with ExecuteScalarAsync(). Previously this would return DBNull.Value when pg_advisory_lock returned null, but as of 8.0 it seems to return DBNull.Value instead.

My brief scan of the breaking change documentation didn't turn up anything about this, so I decided to report. Apologies if I missed it!

Further technical details

Npgsql version: 8.0.0

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No 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.