Skip to content

pdo_pgsql: question marks seen as parameter placeholders in dollar-quoted string #14244

Closed
@outtersg

Description

@outtersg

Description

Dollar-quoting is a PostgreSQL way of quoting strings, and "no characters inside a dollar-quoted string are ever escaped" (see the official docs).

pdo_pgsql however sees ? as parameter placeholders (and replaces them with $1, $2, etc., when not emulating prepares which is the default mode).

See attached test case bug14244.phpt

PHP Version

PHP 8.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions