UUID datatype question

Поиск
Список
Период
Сортировка
От David Kerr
Тема UUID datatype question
Дата
Msg-id 20090713191339.GA87325@mr-paradox.net
обсуждение исходный текст
Ответы Re: UUID datatype question
Список 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
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Nelson Correia
Дата:
Сообщение: pg_dump of a big table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: UUID datatype question