In the docs for the uuid datatype it states:
(http://www.postgresql.org/docs/8.4/static/datatype-uuid.html)
PostgreSQL also accepts the following alternative forms for input: use of upper-case digits, the standard format
surroundedby braces, omitting some
or all hyphens, adding a hyphen after any group of four digits. Examples are:
A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11
{a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11}
a0eebc999c0b4ef8bb6d6bb9bd380a11
a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11
{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}
I can't get the curly bracket ones to work. Everything else works fine. Any idea what am I missing?
\d testuuid
Table "public.testuuid"
Column | Type | Modifiers
--------+------+-----------
t1 | uuid |
Tried with escaping:
insert into testuuid values ('\{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11\}');
WARNING: nonstandard use of escape in a string literal
LINE 1: insert into testuuid values ('\{a0eebc99-9c0b4ef8-bb6d6bb9-b...
^
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
ERROR: invalid input syntax for uuid: "{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}"
Tried w/o escaping:
insert into testuuid values ('{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}');
ERROR: invalid input syntax for uuid: "{a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}"
Thanks
Dave