The UUID is shown as HEX.  The letters are changed to CAPITAL letters and the dashs are taken out.

  • You must to post comments
Postgres UUID type is HEX binary.
And the capitalized HEX and lower-case should not make any different for Postgres.
Postgres will treat them as same HEX values.
Official documentation of UUID

The data type uuid stores Universally Unique Identifiers (UUID) as defined by RFC 4122, ISO/IEC 9834-8:2005, and related standards.

PostgreSQL also accepts the following alternative forms for input: use of upper-case digits, the standard format surrounded by braces, omitting some or all hyphens, adding a hyphen after any group of four digits.

Output is always in the standard form.

That means you can do either of below query and it should work.
SELECT * FROM database WHERE id = '40E6215DB5C64896987CF30F3678F608'
SELECT * FROM database WHERE id = '40e6215d-b5c6-4896-987c-f30f3678f608'
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.