Consultas "case-insensitive"

From: David Hinojosa <davidh(at)meditex(dot)es>
To: Lista mail pgsql <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: Consultas "case-insensitive"
Date: 1997-12-12 12:05:40
Message-ID: 34912894.2BA6@meditex.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Una consulta:

Se puede hacer una consulta tipo "like" de modo que no tenga en cuenta
si el texto est�en maysculas/minscular?

Gracias

From bruno(at)sac(dot)com(dot)mx Fri Dec 12 10:55:24 1997
Return-Path: <owner-pgsql-ayuda>
Received: (from majordom(at)localhost)
by tlali.iztacala.unam.mx (8.8.5/8.8.5) id KAA03216
for pgsql-ayuda-outgoing; Fri, 12 Dec 1997 10:53:47 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordom set sender to owner-pgsql-ayuda using -f
Received: from sac.org.org.mx (sac.org.org.mx [200.15.12.13])
by tlali.iztacala.unam.mx (8.8.5/8.8.5) with ESMTP id KAA03212
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Fri, 12 Dec 1997 10:53:46 -0600
Received: from sac.com.mx ([132.248.237.50])
by sac.org.org.mx (8.8.5/8.8.5) with ESMTP id LAA23430;
Fri, 12 Dec 1997 11:24:53 -0600
Message-ID: <34916C7C(dot)63D75B3(at)sac(dot)com(dot)mx>
Date: Fri, 12 Dec 1997 10:55:24 -0600
From: Bruno Unna <bruno(at)sac(dot)com(dot)mx>
Organization: Grupo Alta Calidad
X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.30 i586)
MIME-Version: 1.0
To: David Hinojosa <davidh(at)meditex(dot)es>
CC: Lista mail pgsql <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: Re: Consultas "case-insensitive"
References: <Pine(dot)LNX(dot)3(dot)93(dot)971211114507(dot)18316B-100000(at)cactus(dot)iico(dot)uaslp(dot)mx> <34912894(dot)2BA6(at)meditex(dot)es>
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda
Precedence: bulk
Content-Length: 4476
Lines: 125
Status: RO
X-Status: U
X-KMail-EncryptionState:
X-KMail-SignatureState:
X-KMail-MDN-Sent:

David Hinojosa wrote:
>
> Una consulta:
>
> Se puede hacer una consulta tipo "like" de modo que no tenga en cuenta
> si el texto est�en maysculas/minscular?
>
> Gracias

Si, al comparar tus strings usa el operador ~*

Echale un ojo a la pagina de manual pgbuiltin, de la cual
estoy recortando esto:

BINARY OPERATORS
Operators:

general
<= less or equal
<> inequality
< less than
<= greater or equal
>= greater or equal
> greater than
= equality
~ A matches regular expression B,
case-sensitive
!~ A does not match regular expression B,
case-sensitive
~* A matches regular expression B,
case-insensitive.
!~* A does not match regular expression B,
case-insensitive
~~ A matches LIKE expression B,
case-sensitive
!~~ A does not match LIKE expression B,
case-sensitive

PostgreSQL 04/01/97 7

PGBUILTIN(INTRO) PostgreSQL PGBUILTIN(INTRO)

+ addition
- subtraction
* multiplication
/ division
% modulus
@ &< A overlaps
B, but does not extend to right of B
&> A overlaps B, but does not extend to
left of B
<< A is left of B
>> A is right of B
>^ A is above B
<^ A is below B

float8
^ exponentiation
% truncate to integer
|/ square root
||/ cube root
: exponential function
; natural logarithm (in psql, protect with
parentheses)

point
<< A is left of B
>> A is right of B
>^ A is above B
<^ A is below B
~= A same as B (equality)
@ point inside (or on) path, box, circle,
polygon

box
&& boxes overlap
&< box A overlaps box B, but does not
extend to right of box B
&> box A overlaps box B, but does not
extend to left of box B
<< A is left of B
>> A is right of B
>^ A is above B
<^ A is below B
= area equal
< area less than
<= area less or equal
>= area greater or equal
> area greater than
~= A same as B (equality)
@ A is contained in B
~ A contains B
@@ center of box

PostgreSQL 04/01/97 8

PGBUILTIN(INTRO) PostgreSQL PGBUILTIN(INTRO)

polygon
&& polygons overlap
&< A overlaps B but does not extend to
right of B
&> A overlaps B but does not extend to left
of B
<< A is left of B
absolute value

geometric
@ A contained by (inside or on) B
~ A contains (around or on) B
@@ center of object
<-> distance between A and B
&& objects overlap

Bueno, etc.

Saludos.

--
+-------------------------------------------------------+
| Bruno Unna |
+------------------+--------------+---------------------+
| bruno(at)sac(dot)com(dot)mx | ICQ: 1858580 | Pub. Key by request |
+------------------+--------------+---------------------+

In response to

  • LIBPQ at 1997-12-11 17:48:39 from Jose de Jesus Rivera Zavala

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message RHS Linux User 1997-12-17 18:05:04 !!Deseo Aprender....
Previous Message Carlos RCU 1997-12-12 10:06:34 Solución: Consuta BD a través de CGI