Re: [HACKERS] Proposal for GUID datatype

2006-09-11 Thread Gevik Babakhani
I forgot the mention that I did not want to support those two in my initial version. But yesterday I started to work on those anyway :) typreceive and typsend On Mon, 2006-09-11 at 15:58 +0200, Markus Schaber wrote: > Hi, Gevik, > > Gevik Babakhani wrote: > > > typreceive = not supported >

Re: [HACKERS] Proposal for GUID datatype

2006-09-11 Thread Jan de Visser
On Monday 11 September 2006 11:05, Thomas Hallgren wrote: > Jan de Visser wrote: > > On Friday 08 September 2006 15:18, Gevik Babakhani wrote: > >> 2a) Three input formats are supported. > >> example: > >> insert into tbl (fld) values('1dfb39af-b56a-40b8-a903-b5b31567c3ce'); > >> insert into tbl (f

Re: [HACKERS] Proposal for GUID datatype

2006-09-11 Thread Thomas Hallgren
Jan de Visser wrote: On Friday 08 September 2006 15:18, Gevik Babakhani wrote: 2a) Three input formats are supported. example: insert into tbl (fld) values('1dfb39af-b56a-40b8-a903-b5b31567c3ce'); insert into tbl (fld) values('{1dfb39af-b56a-40b8-a903-b5b31567c3ce}'); insert into tbl (fld) value

Re: [HACKERS] Proposal for GUID datatype

2006-09-11 Thread Markus Schaber
Hi, Gevik, Gevik Babakhani wrote: > typreceive = not supported > typsend = not supported Any reason why you don't want to support binary transmissions? Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against softwa

Re: [HACKERS] Proposal for GUID datatype

2006-09-09 Thread Stephan Szabo
On Sat, 9 Sep 2006, Jan de Visser wrote: > On Saturday 09 September 2006 01:33, [EMAIL PROTECTED] wrote: > > I don't think so. If it isn't 128 bits - and you want to fit it into > > 128 bits, it means padding. Where should the padding go? As application > > specific, it is up to the application to

Re: [HACKERS] Proposal for GUID datatype

2006-09-09 Thread mark
On Sat, Sep 09, 2006 at 08:29:16AM -0400, [EMAIL PROTECTED] wrote: > On Sat, Sep 09, 2006 at 07:06:23AM -0400, Jan de Visser wrote: > > On Saturday 09 September 2006 01:33, [EMAIL PROTECTED] wrote: > > > I don't think so. If it isn't 128 bits - and you want to fit it into > > > 128 bits, it means p

Re: [HACKERS] Proposal for GUID datatype

2006-09-09 Thread mark
On Sat, Sep 09, 2006 at 07:06:23AM -0400, Jan de Visser wrote: > On Saturday 09 September 2006 01:33, [EMAIL PROTECTED] wrote: > > I don't think so. If it isn't 128 bits - and you want to fit it into > > 128 bits, it means padding. Where should the padding go? As application > > specific, it is up

Re: [HACKERS] Proposal for GUID datatype

2006-09-09 Thread Jan de Visser
On Saturday 09 September 2006 01:33, [EMAIL PROTECTED] wrote: > I don't think so. If it isn't 128 bits - and you want to fit it into > 128 bits, it means padding. Where should the padding go? As application > specific, it is up to the application to convert. I am not saying that. I am just saying

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread mark
On Sat, Sep 09, 2006 at 01:03:24AM -0400, Jan de Visser wrote: > On Saturday 09 September 2006 00:42, [EMAIL PROTECTED] wrote: > > But if the input isn't 32 hexadecimal characters - I don't see how > > it fits the UUID/GUID type. > Again, it wasn't about that particular *value* (which, as I > conc

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Alvaro Herrera
Jan de Visser wrote: > On Saturday 09 September 2006 00:42, [EMAIL PROTECTED] wrote: > > But if the input isn't 32 hexadecimal characters - I don't see how > > it fits the UUID/GUID type. > > Again, it wasn't about that particular *value* (which, as I concurred, is not > a [GU]UID). It was about

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Jan de Visser
On Saturday 09 September 2006 00:42, [EMAIL PROTECTED] wrote: > But if the input isn't 32 hexadecimal characters - I don't see how > it fits the UUID/GUID type. Again, it wasn't about that particular *value* (which, as I concurred, is not a [GU]UID). It was about the fact that different tools spi

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread mark
On Fri, Sep 08, 2006 at 10:49:21PM -0400, Jan de Visser wrote: > On Friday 08 September 2006 21:34, [EMAIL PROTECTED] wrote: > > On Fri, Sep 08, 2006 at 09:24:19PM -0400, Jan de Visser wrote: > > > On Friday 08 September 2006 15:18, Gevik Babakhani wrote: > > > > 2a) Three input formats are support

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Jan de Visser
On Friday 08 September 2006 21:34, [EMAIL PROTECTED] wrote: > On Fri, Sep 08, 2006 at 09:24:19PM -0400, Jan de Visser wrote: > > On Friday 08 September 2006 15:18, Gevik Babakhani wrote: > > > 2a) Three input formats are supported. > > > example: > > > insert into tbl (fld) values('1dfb39af-b56a-40

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread mark
On Fri, Sep 08, 2006 at 09:24:19PM -0400, Jan de Visser wrote: > On Friday 08 September 2006 15:18, Gevik Babakhani wrote: > > 2a) Three input formats are supported. > > example: > > insert into tbl (fld) values('1dfb39af-b56a-40b8-a903-b5b31567c3ce'); > > insert into tbl (fld) values('{1dfb39af-b5

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Jan de Visser
On Friday 08 September 2006 15:18, Gevik Babakhani wrote: > 2a) Three input formats are supported. > example: > insert into tbl (fld) values('1dfb39af-b56a-40b8-a903-b5b31567c3ce'); > insert into tbl (fld) values('{1dfb39af-b56a-40b8-a903-b5b31567c3ce}'); > insert into tbl (fld) values('1dfb39afb56

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Gevik Babakhani
On Fri, 2006-09-08 at 16:17 -0400, Tom Lane wrote: > Gevik Babakhani <[EMAIL PROTECTED]> writes: > > typreceive = not supported > > typsend = not supported > > Really? Why not? You are right, typreceive/typsend are also needed. How would you advice to test this? > I would suggest that the defau

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Martijn van Oosterhout
Just a few comments, On Fri, Sep 08, 2006 at 09:18:20PM +0200, Gevik Babakhani wrote: > 5) support functions: > because uuid could also be used as PK or unique values, additional > function(s) will be available to produce a uuid value to be used in > a field's default value like sequences or PL/p

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Tom Lane
Gevik Babakhani <[EMAIL PROTECTED]> writes: > typreceive = not supported > typsend = not supported Really? Why not? I would suggest that the default output format just be 32 hex characters, since that would render the type useful for purposes other than one narrow definition of UUID.

Re: [HACKERS] Proposal for GUID datatype

2006-09-08 Thread Gevik Babakhani
Martijn van Oosterhout wrote: Just a few comments, On Fri, Sep 08, 2006 at 09:18:20PM +0200, Gevik Babakhani wrote: 5) support functions: because uuid could also be used as PK or unique values, additional function(s) will be available to produce a uuid value to be used in a field's default