dotnet / dotnet/efcore

Support numbered positional parameter placeholders

Open
#27,377 0 comments 3 reactions 0 assignees View on GitHub
area-global
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

PostgreSQL native parameter placeholders are $1, $2, etc. This is different from the e.g. ODBC placeholders (?, ?), which are also positional but not numbered (i.e. PG allows referring to the same parameter more than once, whereas ODBC does not). Unfortunately, our current placeholder logic currently doesn't allow for (command) state to participate in the generation (i.e. what's the next number).

Assuming we want to do this, it would probably be done along with #22458, which is about some cleanup of the placeholder logic.

Note: Npgsql also supports named placeholder (@foo), by rewriting them to the native PG placeholders. This issue would allow us to stop doing that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.