Tom Lane wrote:
[snip]
Hmmm...I'd hate to have two indexes on every field I query like this, one
case-senstive, one case-insensitve (like the one you create here). Is
there a configuration option or something that will tell pgsql to do
case-insensitive comparisons (kinda like MS SQL
On Sun, 18 Feb 2001, Martijn van Oosterhout wrote:
Tom Lane wrote:
[snip]
Then why are you bothering to maintain a case-sensitive index?
There's no free lunch available here; if you think there is, then you
are misunderstanding what an index is. Either the index is in
On Thu, 15 Feb 2001, Michael Fork wrote:
Indexes *can* and *will* be used if you create the appropiate
functional indexes, i.e:
CREATE INDEX idx_table_field_upper ON table(upper(field));
SELECT field FROM table WHERE upper(field) LIKE upper('some string');
Hmmm...I'd hate to have two
On Thu, 15 Feb 2001, Michael Fork wrote:
Indexes *can* and *will* be used if you create the appropiate
functional indexes, i.e:
CREATE INDEX idx_table_field_upper ON table(upper(field));
SELECT field FROM table WHERE upper(field) LIKE upper('some string');
Hmmm...I'd hate to
On Fri, 16 Feb 2001, Bruce Momjian wrote:
Yes, our CREATE INDEX lower(col) already does that, but you do have to
use lower(col) when doing the query.
Right, that's what I'm suggesting a configuration that automates the
lower(col) bit in CREATE INDEX and that automates the lower(col) in
On Thu, 15 Feb 2001, Tom Lane wrote:
Not then either; you'd need to write
SELECT *
FROM mime_type
WHERE LOWER(name) = LOWER('text/HTML');
or equivalently
SELECT *
FROM mime_type
WHERE LOWER(name) = 'text/html';
which is what will result from constant-folding anyway.
Hmmm... I'm trying to create an index,
CREATE INDEX idx_server__host_name ON server(LOWER(host_name));
But it won't create. Here's the error:
ERROR: DefineIndex: function 'upper(varchar)' does not exist
Anyone know what's up with that? The table does have the host_name column
of type
Forgot to mention, I'm using 7.03.
Thanks,
David
On Thu, 15 Feb 2001, David Wheeler wrote:
Hmmm... I'm trying to create an index,
CREATE INDEX idx_server__host_name ON server(LOWER(host_name));
But it won't create. Here's the error:
ERROR: DefineIndex: function 'upper(varchar)'
It is in the list archives several times.
All you need is to use some basic SQL.
select * from mytable where upper('my criteria') = upper(mytable.info);
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
- Original Message -
From: "David
Hi
use it if u absolutly need it.. Using a function on a column name
doesnt use the index associated with that column,.. So exercise this
option with some amount of thinking..
Anand
On Wed, Feb 14, 2001 at 11:39:47AM -0500, Adam Lang wrote:
It is in the list archives several times.
All you need
Indexes *can* and *will* be used if you create the appropiate
functional indexes, i.e:
CREATE INDEX idx_table_field_upper ON table(upper(field));
SELECT field FROM table WHERE upper(field) LIKE upper('some string');
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access -
11 matches
Mail list logo