Skip to content

database/sql: incorrect assumptions about parameter names #60577

Open
@mikerobi

Description

@mikerobi

What version of Go are you using (go version)?

go1.20.4 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

reviewed the function validateNamedValueName in go/src/database/sql/convert.go

What did you expect to see?

The function does not make the incorrect assumption that procedure parameters always start with a letter.

What did you see instead?

The function should not reject valid parameter names.

For example, $foo, and #bar are valid stored procedure parameters in SQL Server.

This means that the function needs to support all valid parameter names (which is unknowable), or should be eliminated.

I believe it acceptable to not perform a check and leave it to the database to generate an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions