Search Postgresql Archives

newid() in postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux