From: | David Kerr <dmk(at)mr-paradox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | UUID datatype question |
Date: | 2009-07-13 19:13:39 |
Message-ID: | 20090713191339.GA87325@mr-paradox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 surrounded by 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-07-13 19:28:09 | Re: UUID datatype question |
Previous Message | Martie Krukkeland | 2009-07-13 19:11:50 | Re: Question] |