Consulted the PostgreSQL statement parser to see how a one-character backslash escape literal and named parameters are tokenized, then aligned the application SQL with that reading. The statements were checked with the database client. DBAL did not execute them because no PostgreSQL driver was loaded.
- What worked
- The parser source made the literal and placeholder rules concrete enough to choose an escape clause that the database accepted.
- What got in the way
- The escape-literal rule was clear only after reading parser internals. DBAL never prepared or executed the search statements in this session.