Re: [DOCS] uuid type not documented
Re: [DOCS] uuid type not documented
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Am Dienstag, 10. April 2007 17:30 schrieb Neil Conway: > On Tue, 2007-04-10 at 17:24 +0200, Peter Eisentraut wrote: > > The new uuid type is lacking documentation. > > We had also talked about including some UUID generation functionality in > 8.3, but it should be okay to leave that for 8.4. The problem is that most of the standard methods are platform dependent, as they require MAC addresses or a "good" random source, for instance. I'm not sure how we wanted to solve that, but certainly leaving the uuid type with *no* method to generate one is pretty poor. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Re: [DOCS] uuid type not documented
От:
"Joshua D. Drake" <jd@commandprompt.com>
Дата:
Peter Eisentraut wrote:
> Am Dienstag, 10. April 2007 17:30 schrieb Neil Conway:
>> On Tue, 2007-04-10 at 17:24 +0200, Peter Eisentraut wrote:
>>> The new uuid type is lacking documentation.
>> We had also talked about including some UUID generation functionality in
>> 8.3, but it should be okay to leave that for 8.4.
>
> The problem is that most of the standard methods are platform dependent, as
> they require MAC addresses or a "good" random source, for instance. I'm not
> sure how we wanted to solve that, but certainly leaving the uuid type with
> *no* method to generate one is pretty poor.
Actually, I would say that not having the ability to generate a UUID is
just fine. Most languages, have the ability to generate them per their
particular platforms. Let's leave it to them.
Sincerely,
Joshua D. Drake
>
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/
Re: [DOCS] uuid type not documented
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Joshua D. Drake" writes: > Peter Eisentraut wrote: >> The problem is that most of the standard methods are platform dependent, as >> they require MAC addresses or a "good" random source, for instance. I'm not >> sure how we wanted to solve that, but certainly leaving the uuid type with >> *no* method to generate one is pretty poor. > Actually, I would say that not having the ability to generate a UUID is > just fine. Most languages, have the ability to generate them per their > particular platforms. Let's leave it to them. Let us *not* open that can of worms for 8.3. This patch would not have got in except that it didn't attempt to solve that problem, and there's even less time available now. regards, tom lane
Re: [DOCS] uuid type not documented
От:
Neil Conway <neilc@samurai.com>
Дата:
On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: > The problem is that most of the standard methods are platform dependent, as > they require MAC addresses or a "good" random source, for instance. http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php ISTM random() or similar sources is a sufficient PSRNG for the purposes of UUID generation -- I can't see anything in the RFC that would contradict that. -Neil
Re: [DOCS] uuid type not documented
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Neil Conway wrote: > On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: > >> The problem is that most of the standard methods are platform dependent, as >> they require MAC addresses or a "good" random source, for instance. >> > > http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php > > ISTM random() or similar sources is a sufficient PSRNG for the purposes > of UUID generation -- I can't see anything in the RFC that would > contradict that. > > How about we set up a contrib (I wish we'd fixed that) module with an example function or two? cheers andrew
Re: [DOCS] uuid type not documented
От:
"Florian G. Pflug" <fgp@phlo.org>
Дата:
Neil Conway wrote: > On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: >> The problem is that most of the standard methods are platform dependent, as >> they require MAC addresses or a "good" random source, for instance. > > http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php > > ISTM random() or similar sources is a sufficient PSRNG for the purposes > of UUID generation -- I can't see anything in the RFC that would > contradict that. Maybe a short-term solution could be a UUID-generated function that takes some kind of seed as a parameter. People not concerned about collisons could just pass some random value, while others could use the mac-address of the client or something similar. greetings, Florian Pflug
Re: [DOCS] uuid type not documented
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Neil Conway writes: > On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: >> The problem is that most of the standard methods are platform dependent, as >> they require MAC addresses or a "good" random source, for instance. > http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php > ISTM random() or similar sources is a sufficient PSRNG for the purposes > of UUID generation -- I can't see anything in the RFC that would > contradict that. Doesn't seem like quite enough bits of uniqueness. We could improve matters by incorporating the database's pg_control.system_identifier into the UUID, substituting for the MAC address we don't have a good way to get. system_identifier is currently determined by the system clock at initdb time (to gettimeofday precision), so it would add at least some additional bits of randomness... regards, tom lane
Re: [DOCS] uuid type not documented
От:
Roman Neuhauser <neuhauser@sigpipe.cz>
Дата:
# andrew@dunslane.net / 2007-04-10 15:49:08 -0400: > Neil Conway wrote: > >On Tue, 2007-04-10 at 18:28 +0200, Peter Eisentraut wrote: > > > >>The problem is that most of the standard methods are platform dependent, > >>as they require MAC addresses or a "good" random source, for instance. > >> > > > >http://archives.postgresql.org/pgsql-patches/2007-01/msg00392.php > > > >ISTM random() or similar sources is a sufficient PSRNG for the purposes > >of UUID generation -- I can't see anything in the RFC that would > >contradict that. > > > > > > How about we set up a contrib (I wish we'd fixed that) module with an > example function or two? Thought I'd mention Ralph Engelschall's uuid library, comes with a PostgreSQL binding: http://www.ossp.org/pkg/lib/uuid/ http://cvs.ossp.org/fileview?f=ossp-pkg/uuid/pgsql/uuid.txt&v=1.1 I only played with it some time ago. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
Re: [DOCS] uuid type not documented
От:
"Marko Kreen" <markokr@gmail.com>
Дата:
On 4/10/07, Peter Eisentraut wrote: > The problem is that most of the standard methods are platform dependent, as > they require MAC addresses or a "good" random source, for instance. FYI: good random source is already available in pgcrypto, it uses either OpenSSL RAND_bytes() or internal strong PRNG. -- marko