UUID datatype

Started by Sridhar N Bamandlapallyalmost 10 years ago3 messagesgeneral
Jump to latest
#1Sridhar N Bamandlapally
sridhar.bn1@gmail.com

Hi

Is there a way to implicit SELECT on UUID datatype in uppercase ?

Please

Thanks
Sridhar

#2Michael Paquier
michael@paquier.xyz
In reply to: Sridhar N Bamandlapally (#1)
Re: UUID datatype

On Mon, May 30, 2016 at 4:25 PM, Sridhar N Bamandlapally
<sridhar.bn1@gmail.com> wrote:

Hi

Is there a way to implicit SELECT on UUID datatype in uppercase ?

You could always cast an UUID back to text and use that with upper(),
though you are not explaining what you are tying to achieve:
=# select upper(gen_random_uuid()::text);

upper
--------------------------------------
057A3BC2-0E62-4D68-B01A-C44D20F91450
(1 row)
--
Michael

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Sridhar N Bamandlapally
sridhar.bn1@gmail.com
In reply to: Michael Paquier (#2)
Re: UUID datatype

This I got, need some implicit way, like maybe in RULE on SELECT can we
write this ?

Thanks
Sridhar
OpenText

On Mon, May 30, 2016 at 1:05 PM, Michael Paquier <michael.paquier@gmail.com>
wrote:

Show quoted text

On Mon, May 30, 2016 at 4:25 PM, Sridhar N Bamandlapally
<sridhar.bn1@gmail.com> wrote:

Hi

Is there a way to implicit SELECT on UUID datatype in uppercase ?

You could always cast an UUID back to text and use that with upper(),
though you are not explaining what you are tying to achieve:
=# select upper(gen_random_uuid()::text);

upper
--------------------------------------
057A3BC2-0E62-4D68-B01A-C44D20F91450
(1 row)
--
Michael