PostgreSQL error code
PostgreSQL error 22P02
22P02 is the SQLSTATE PostgreSQL reports for invalid text representation, in class 22, Data Exception.
| SQLSTATE | 22P02 |
|---|---|
| Condition name | invalid_text_representation |
| Class | 22 — Data Exception |
Reproduce it, then fix it
These are the queries from the guide below. Run the broken query to see the error, then switch to the fixed one. Edit either freely; every run is rolled back.
SELECT id, status, total_amount FROM demo.orders WHERE customer_id = 'alice@example.com';
SELECT o.id, o.status, o.total_amount FROM demo.orders o JOIN demo.customers c ON c.id = o.customer_id WHERE c.email = 'alice@example.com';