Re: indice usando un CASE (8.2)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Miguel Beltran R(dot) <yourpadre(at)gmail(dot)com>
Cc: Ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: indice usando un CASE (8.2)
Date: 2010-08-03 17:24:01
Message-ID: 1280856205-sup-7324@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Excerpts from Miguel Beltran R.'s message of lun ago 02 14:03:08 -0400 2010:

> ON folio
> USING btree
> (CASE
> WHEN (strpos(folio.folio::text, '-'::text) - 1) > 0
> THEN substr(folio.folio::text, 1, strpos(folio.folio::text,
> '-'::text) - 1)::bigint
> ELSE folio.folio::bigint
> END );

Corrige el modelo.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message JHONATAN CANO FURAGARO 2010-08-03 18:45:52 Importar tabla en postgres
Previous Message Alejandra Bautista 2010-08-03 16:23:47 Re: Convertir int en serial