Opinion wanted on UUID/GUID datatype output formats. - Mailing list pgsql-hackers

From Gevik Babakhani
Subject Opinion wanted on UUID/GUID datatype output formats.
Date
Msg-id 1158248176.15482.16.camel@voyager.truesoftware.net
Whole thread Raw
Responses Re: Opinion wanted on UUID/GUID datatype output formats.  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: Opinion wanted on UUID/GUID datatype output formats.  ("Dawid Kuroczko" <qnex42@gmail.com>)
Re: Opinion wanted on UUID/GUID datatype output formats.  (Josh Berkus <josh@agliodbs.com>)
Re: Opinion wanted on UUID/GUID datatype output formats.  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Folks,

I would like to have your opinion on the following:

At this moment we (almost) have a uuid/guid datatype.
As suggested in earlier discussion we provide a raw/plain output of the
uuid type:

devdb=# select * from tbluuid;               pk                |
----------------------------------+6b13c5a1afb4dcf5ce8f8b4656b6c93c |01e40a79b55b6e226bffb577e960453d |
(2 rows)

I was wondering if we want to have a formatting function to be able to
provide other common formats of the uuid/guid?

something like:

select format_uuid(mypk,'format2') from tbluuid;
and then get: 6b13c5a1-afb4-dcf5-ce8f-8b4656b6c93c

or

select format_uuid(mypk,'format3') from tbluuid;
and then get: {6b13c5a1-afb4-dcf5-ce8f-8b4656b6c93c}
(which would be MSSQL compatible)


Do we want such a function added to the core or we let the application
handle the formatting if ever needed.

What do the PostgreSQL masters think? :)

Regards,
Gevik.












pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CSStorm occurred again by postgreSQL8.2
Next
From: "Strong, David"
Date:
Subject: Re: Lock partitions