Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Tom Lane
Martijn van Oosterhout writes: > The input functions get it, the output functions (bpcharout, > bpcharsend, etc) don't. Which makes it kind of hard to print a raw > value if you don't know how long it's going to be. They used to, but > that was removed some time back. Even back then you couldn't

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Martijn van Oosterhout
On Wed, Jun 28, 2006 at 01:56:47PM +0200, Thomas Hallgren wrote: > A user that is trusted with installing a C-function in the backend is > free to scan the process memory anyway so in what way did that increase > the security? IMHO, the only relevant security in that context is to > have trusted

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Thomas Hallgren
Martijn van Oosterhout wrote: On Wed, Jun 28, 2006 at 12:03:40PM +0200, Thomas Hallgren wrote: OK. I thought you always had a type descriptor handy when reading the binary representation. I've noticed that the typmod is expected in some receive functions (bpcharrecv and numeric_recv for inst

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Martijn van Oosterhout
On Wed, Jun 28, 2006 at 12:03:40PM +0200, Thomas Hallgren wrote: > OK. I thought you always had a type descriptor handy when reading the > binary representation. I've noticed that the typmod is expected in some > receive functions (bpcharrecv and numeric_recv for instance). Are you > saying that

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Thomas Hallgren
Martijn van Oosterhout wrote: On Wed, Jun 28, 2006 at 10:22:45AM +0200, Thomas Hallgren wrote: Thanks. That would of course work but at the same time it increases the complexity of my app. Yet another component to install and keep track of. It's also a bit of an overkill since the only thing I

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Martijn van Oosterhout
On Wed, Jun 28, 2006 at 10:22:45AM +0200, Thomas Hallgren wrote: > Thanks. That would of course work but at the same time it increases the > complexity of my app. Yet another component to install and keep track > of. It's also a bit of an overkill since the only thing I need is an > opaque bit s

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Thomas Hallgren
Martijn van Oosterhout wrote: On Wed, Jun 28, 2006 at 09:01:49AM +0200, Thomas Hallgren wrote: I'm building an app where I have several entities that are identified using a UUID (i.e. a 128 bit quantity). My current implementation uses a composite primary key consisting of two int8 values. I

Re: [GENERAL] UUID's as primary keys

2006-06-28 Thread Martijn van Oosterhout
On Wed, Jun 28, 2006 at 09:01:49AM +0200, Thomas Hallgren wrote: > I'm building an app where I have several entities that are identified > using a UUID (i.e. a 128 bit quantity). My current implementation uses a > composite primary key consisting of two int8 values. It's a bit > cumbersome and I

[GENERAL] UUID's as primary keys

2006-06-28 Thread Thomas Hallgren
I'm building an app where I have several entities that are identified using a UUID (i.e. a 128 bit quantity). My current implementation uses a composite primary key consisting of two int8 values. It's a bit cumbersome and I would much rather have a distinct type. An earlier implementation using