Thread: Globally Unique IDs?

Globally Unique IDs?

From
"Rose, Keith"
Date:
I am new to the mailing list, but not new to postgres.  I did search through
the mail-list archives, and didn't find an answer to this question.  Oracle
has a concept of a "globally unique ID" which can be gotten from their
function call SYS_GUID().  Is there any plan to implement this (or something
analogous) in a future version of Postgres?

--
Keith Rose (ext. 2144)


Re: Globally Unique IDs?

From
"Mitch Vincent"
Date:
You can get the same result I suppose if you just use the same sequence
across all your tables.. Is Oracle doing anything more than that? You could
even make a quick function to get the next value from a sequence and call it
SYS_GUID() -- just an idea :-)

Good luck!

-Mitch
Software development :
You can have it cheap, fast or working. Choose two.

----- Original Message -----
From: "Rose, Keith" <keithr@aiinet.com>
To: "'PostgreSQL General'" <pgsql-general@postgresql.org>
Sent: Friday, March 30, 2001 1:42 PM
Subject: Globally Unique IDs?


> I am new to the mailing list, but not new to postgres.  I did search
through
> the mail-list archives, and didn't find an answer to this question.
Oracle
> has a concept of a "globally unique ID" which can be gotten from their
> function call SYS_GUID().  Is there any plan to implement this (or
something
> analogous) in a future version of Postgres?
>
> --
> Keith Rose (ext. 2144)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: Globally Unique IDs?

From
Soma Interesting
Date:
At 01:42 PM 3/30/2001 -0500, you wrote:
>I am new to the mailing list, but not new to postgres.  I did search through
>the mail-list archives, and didn't find an answer to this question.  Oracle
>has a concept of a "globally unique ID" which can be gotten from their
>function call SYS_GUID().  Is there any plan to implement this (or something
>analogous) in a future version of Postgres?


I'm far from an expert with Postgresql, but I was just thinking the other
day that you could probably use a single "sequence" in postgres for a
number of tables to make sure id's are unique across multiple tables.

If your not familiar with sequences, see here:
http://www.postgresql.org/devel-corner/docs/user/datatype.html#DATATYPE-SERIAL



RE: Globally Unique IDs?

From
"Rose, Keith"
Date:
Well, that is what we are doing. I really haven't looked into Oracle's
implementation.  I actually _just_ got Oracle installed (along-side our
postgres installation) to start playing with it.

-----Original Message-----
From: Mitch Vincent [mailto:mitch@venux.net]
Sent: Friday, March 30, 2001 1:47 PM
To: Rose, Keith; 'PostgreSQL General'
Subject: Re: Globally Unique IDs?


You can get the same result I suppose if you just use the same sequence
across all your tables.. Is Oracle doing anything more than that? You could
even make a quick function to get the next value from a sequence and call it
SYS_GUID() -- just an idea :-)

Good luck!

-Mitch
Software development :
You can have it cheap, fast or working. Choose two.

----- Original Message -----
From: "Rose, Keith" <keithr@aiinet.com>
To: "'PostgreSQL General'" <pgsql-general@postgresql.org>
Sent: Friday, March 30, 2001 1:42 PM
Subject: Globally Unique IDs?


> I am new to the mailing list, but not new to postgres.  I did search
through
> the mail-list archives, and didn't find an answer to this question.
Oracle
> has a concept of a "globally unique ID" which can be gotten from their
> function call SYS_GUID().  Is there any plan to implement this (or
something
> analogous) in a future version of Postgres?
>
> --
> Keith Rose (ext. 2144)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

RE: Globally Unique IDs?

From
Mike Mascari
Date:
I believe Oracle's SYS_GUID will return an ID unique *throughout the world*
on *all hosts*. Other software uses GUID's for thinks like COM identifiers.
Typical output looks like:

351e1cc0-2540-11d5-a5cd-00036d15ee51

and is generated through some heuristics involving the current date, time,
MAC address, etc. I don't know the specifics -- except that the ID
generated will not be generated by anyone else anywhere. This would be a
useful addition, IMHO.

Mike Mascari
mascarm@mascari.com

-----Original Message-----
From:    Soma Interesting [SMTP:dfunct@telus.net]
Sent:    Friday, March 30, 2001 2:06 PM
To:    Rose, Keith; pgsql-general@postgresql.org
Subject:    Re: [GENERAL] Globally Unique IDs?

At 01:42 PM 3/30/2001 -0500, you wrote:
>I am new to the mailing list, but not new to postgres.  I did search
through
>the mail-list archives, and didn't find an answer to this question.
 Oracle
>has a concept of a "globally unique ID" which can be gotten from their
>function call SYS_GUID().  Is there any plan to implement this (or
something
>analogous) in a future version of Postgres?


I'm far from an expert with Postgresql, but I was just thinking the other
day that you could probably use a single "sequence" in postgres for a
number of tables to make sure id's are unique across multiple tables.

If your not familiar with sequences, see here:
http://www.postgresql.org/devel-corner/docs/user/datatype.html#DATATYPE-
SERIAL



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


Re: Globally Unique IDs?

From
Doug McNaught
Date:
Mike Mascari <mascarm@mascari.com> writes:

> I believe Oracle's SYS_GUID will return an ID unique *throughout the world*
> on *all hosts*. Other software uses GUID's for thinks like COM identifiers.
> Typical output looks like:
>
> 351e1cc0-2540-11d5-a5cd-00036d15ee51
>
> and is generated through some heuristics involving the current date, time,
> MAC address, etc. I don't know the specifics -- except that the ID
> generated will not be generated by anyone else anywhere. This would be a
> useful addition, IMHO.

I can see this being useful but I'm not sure it should go into the
core system--it could be an external function in the contrib/
section.  We've gotten along without it so far...

Oracle is a great system but it suffers from extreme bloat.

Just MHO of course...

-Doug