Re: [GENERAL] UUID as primary key

2006-08-31 Thread Vance Maverick
Can you give a link to the PostgreSQL binding? I haven't been able to find it there. All I see is C, Perl and PHP bindings for the generation of UUIDs, and nothing about storage. (For my application, as it happens, I don't need to generate UUIDs in the database, but I recognize that would be

Re: [GENERAL] UUID as primary key

2006-08-31 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-31 07:35:30 -0700: Ralf Engelschall's OSSP uuid looks very good. Written in C with interfaces into PostgreSQL, PHP and C++ (classes wrapping the C structures and functions). http://www.ossp.org/pkg/lib/uuid/ Can you give a link to the

Re: [GENERAL] UUID as primary key

2006-08-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-21 21:16:14 -0700: I'm considering using a UUID as a primary / foreign key for my schema, to help ensure portability of data in a multi-master context. Does anyone have experience with this? There's a project on Gborg (pguuid) to create a native UUID type,

Re: [GENERAL] UUID as primary key

2006-08-22 Thread Vance Maverick
Thanks for the good suggestion. I spent some time last night verifying that it works, and that I can get the values in and out correctly through JDBC. (When going from Java to the database, for example, it's easiest to compose the value directly into the SQL query rather than using a parameter.)

Re: [GENERAL] UUID as primary key

2006-08-22 Thread Harald Armin Massa
Vance,nice that it was of help.(When going from Java to the database, for example, it's easiest to compose the value directly into the SQL query rather thanusing a parameter.)This seems quite viable.Please allow me to recommend to you to NOT go this seemingly easy way. I went there myself (but did

Re: [GENERAL] UUID as primary key

2006-08-22 Thread Vance Maverick
Thanks, I've gotten this working nicely now (after some offline exchanges with Harald). In JDBC, inet values can be read a couple of ways -- the easiest is to call ResultSet.getString(). And to write them, the easiest is to use prepared statements of the form INSERT INTO xxx VALUES (?::inet,

[GENERAL] UUID as primary key

2006-08-21 Thread Vance Maverick
I'm considering using a UUID as a primary / foreign key for my schema, to help ensure portability of data in a multi-master context. Does anyone have experience with this? There's a project on Gborg (pguuid) to create a native UUID type, but it looks stagnant (and I'd prefer to use PostgreSQL