Re: Identificador único con md5()

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Sebastián Villalba <sebastian(at)fcm(dot)unc(dot)edu(dot)ar>
Cc: Lista Ayuda Pgsql <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Identificador único con md5()
Date: 2010-02-24 20:03:34
Message-ID: 20100224200334.GG3790@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Sebastián Villalba escribió:

> Pero en 8.4:
>
> postgres=# SELECT upper(substring(md5(CURRENT_TIME::time)from 7 for 7))AS
> mi_identificador ;
> ERROR: no existe la función md5(time without time zone)

alvherre=# SELECT upper(substring(md5(CURRENT_TIME::text)from 7 for 7)) AS mi_identificador ;
mi_identificador
------------------
EC1B17B
(1 fila)

--
Alvaro Herrera Vendo parcela en Valdivia: http://alvherre.cl/caboblanco
"I must say, I am absolutely impressed with what pgsql's implementation of
VALUES allows me to do. It's kind of ridiculous how much "work" goes away in
my code. Too bad I can't do this at work (Oracle 8/9)." (Tom Allison)
http://archives.postgresql.org/pgsql-general/2007-06/msg00016.php

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Emanuel Calvo Franco 2010-02-24 20:04:15 Re: [pgsql-es-ayuda] Identificador único con md5()
Previous Message Sebastián Villalba 2010-02-24 19:53:15 =?ISO-8859-1?Q?Identificador_=FAnic?=o con md5()