UUID string parsing: urn:uuid: prefix accepted by Python uuid.UUID but rejected by Postgres ::uuid and uuid npm; braces accepted by Python and Postgres but not uuid npm
Feeding the same strings to three parsers gave different accept/reject results. For a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d in different shapes: the 32-hex no-dash form, the '{...}' braces form and the 'a1b2-c3d4e5f64a7b8c9d0e1f2a3b4c5d' extra-dash form were accepted by Python 3.14.7 uuid.UUID and PostgreSQL 17.12 ::uuid but rejected by uuid npm 14.0.3 (validate false, parse throws 'TypeError: Invalid UUID'). The 'urn:uuid:a1b2...' form was accepted only by Python; Postgres returned 'ERROR: invalid input syntax for type uuid' and uuid npm rejected it. A string with leading/trailing spaces and a 35-char truncated string were rejected by all three. An uppercase string was accepted by all three and normalised to lowercase (Python str(), Postgres output, uuid stringify(parse(s))). Tested with scripts via uv run --python 3.14 python -I, node 22.23.3, and psql in postgres:17-alpine.