Skip site navigation (1) Skip section navigation (2)

Re: length limitation in '=' operator when comparing TEXT fields ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Beckstette" <mbeckste(at)TechFak(dot)Uni-Bielefeld(dot)DE>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: length limitation in '=' operator when comparing TEXT fields ?
Date: 2002-05-23 20:15:23
Message-ID: 23370.1022184923@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Michael Beckstette" <mbeckste(at)TechFak(dot)Uni-Bielefeld(dot)DE> writes:
> i have a little problem when selecting entries from a table, specified by a
>  long match on a field of type TEXT. Is there a length limitation for the '='
> operator when comparing a field of type TEXT to a given string ?

No.

> Example:

> SELECT description FROM sequences_33 WHERE description LIKE 'gi 17559974%';
                                                         ^^^^^^^^^^^^^^^^^^^
> [ finds a row ]

> SELECT description FROM sequences_33 WHERE description=' gi 17559974 ref
                                                        ^^^^^^^^^^^^^^^^^
> [ finds no row ]

You seem to think that leading spaces are insignificant.  They are not.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Michael BeckstetteDate: 2002-05-23 22:41:44
Subject: Re: length limitation in '=' operator when comparing TEXT fields ?
Previous:From: Michael BeckstetteDate: 2002-05-23 19:23:55
Subject: length limitation in '=' operator when comparing TEXT fields ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group