Thread: uniqueidentifier datatype for 7.3.X

uniqueidentifier datatype for 7.3.X

From
"Dmitry G. Mastrukov" Дмитрий Геннадьевич Мастрюков
Date:
Hi All!

I've ported uniqueidentifier datatype to upcoming PostgreSQL 7.3. It's
available at
http://www.taurussoft.org/files/uniqueidentifier-0.1.9.3.tar.gz
In this release there is additional function uniqueidentifier_text()
which converts uniqueidentifier to text datatype. Thanks to Hussein
Patni!

Version for 7.2.X is available at
http://www.taurussoft.org/files/uniqueidentifier-0.1.9.2.tar.gz
Version for 7.1.X is available at
http://www.taurussoft.org/files/uniqueidentifier-0.1.9.1.tar.gz
The only difference between two releases is adoptation to 7.2.X system
catalog. No new functions/bugfixes.

Uniqueidentifier datatype is 128-bit (16 byte) wide datatype claims to
be unique across Universe. It's a good choice for primary indexes and
making relations between tables.
This inplementation depends on libuuid library from e2fsprogs package by
Theodore Ts'o.
Licence is LGPL.

Regards,
Dmitry



Re: uniqueidentifier datatype for 7.3.X

From
Tom Lane
Date:
"Dmitry G. Mastrukov" Дмитрий Геннадьевич Мастрюков <dmitry@taurussoft.org> writes:
> In this release there is additional function uniqueidentifier_text()
> which converts uniqueidentifier to text datatype. Thanks to Hussein
> Patni!

You would be better off to name the conversion function text(uuid)
and declare it as a cast (possibly an explicit-only cast, depending on
whether you think automatic casting of uuid to text is a good idea).
Not following the standard naming convention for conversion functions
just creates an extra memory burden for users.
        regards, tom lane


Re: uniqueidentifier datatype for 7.3.X

From
"Dmitry G. Mastrukov" Дмитрий Геннадьевич Мастрюков
Date:
В Вск, 03.11.2002, в 19:08, Tom Lane написал:
> "Dmitry G. Mastrukov" Дмитрий Геннадьевич Мастрюков <dmitry@taurussoft.org> writes:
> > In this release there is additional function uniqueidentifier_text()
> > which converts uniqueidentifier to text datatype. Thanks to Hussein
> > Patni!
>
> You would be better off to name the conversion function text(uuid)
> and declare it as a cast (possibly an explicit-only cast, depending on
> whether you think automatic casting of uuid to text is a good idea).
> Not following the standard naming convention for conversion functions
> just creates an extra memory burden for users.
>
Thanks, Tom. I thought about it but I should consult with doc how to do
so. Now I simply add Hussein's function to the package because my task
was to port datatype itself.

Regards,
Dmitry