newid() in postgres

Поиск
Список
Период
Сортировка
От marcel.beutner
Тема newid() in postgres
Дата
Msg-id 1175670879.821142.237750@n59g2000hsh.googlegroups.com
обсуждение исходный текст
Ответы Re: newid() in postgres
Список pgsql-general
Hello NG,

Is there an equivalent in postgres for the newid() function like in
sqlserver? I need to generate a unique identifier in my select
statement:

SELECT "X", newid(), "Y" FROM "MyTable"

X
newid()
Y
------------------------------------------------------------------------------------------------------------
1          139A7882-CF95-7C44-AC64-DF4D18614CAD              test
2          D4CD37FE-4BD6-954B-B188-0D5BE0BDCF0E            test2
...


I've searched in the groups already, but couldn't find any helpful
information - only to use a sequence, which returns just a number and
not a unique identifier.

Thanks in advance

Marcel


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

Предыдущее
От: Jonathan Vanasco
Дата:
Сообщение: Re: inserting multiple values in version 8.1.5
Следующее
От: Manoj Lal
Дата:
Сообщение: Postgres 7.4: how to disconnect users without restarting postmaster