From: | CG <cgg007(at)yahoo(dot)com> |
---|---|
To: | postgresql listserv <pgsql-general(at)postgresql(dot)org> |
Subject: | Automatic type conversion |
Date: | 2009-07-15 16:40:39 |
Message-ID: | 67781.11752.qm@web37906.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm in the process of attempting to upgrade from 8.1 to 8.4, and I've been using the uniqueidentifier contrib module for my UUID's ... In 8.1 Postgresql was able to figure out what to do with statements like
# SELECT 'Your new UUID is ' || newid();
?column?
-------------------------------------------------------
Your new UUID is 5f1a4987-9005-42d6-8e62-d1ff14bb1433
(1 row)
but in 8.4 (and probably 8.3 also...),
# SELECT 'Your new UUID is ' || newid();
ERROR: operator is not unique: unknown || uniqueidentifier
LINE 1: SELECT 'Your new UUID is ' || newid();
^
HINT: Could not choose a best candidate operator. You might need to add explicit type casts.
But, with the new internal UUID datatype, what is the magic recipe that allows this to run?
# SELECT 'Your new UUID is ' || uuid_generate_v4();
?column?
-------------------------------------------------------
Your new UUID is cd8d8f5f-3eea-4e96-be4f-f93daa174d8f
(1 row)
I could add the explicit type casts, but I'd rather find out what the nature of the subtle (or not-so-subtle) difference I've stumbled upon is...
From | Date | Subject | |
---|---|---|---|
Next Message | dipesh mistry (Imap) | 2009-07-15 16:49:40 | Function does not exist |
Previous Message | Alvaro Herrera | 2009-07-15 16:28:57 | Re: [GENERAL] large object does not exist after pg_migrator |