pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedcase-insensitive index lower()
2+ messages / 2 participants
[nested] [flat]
* case-insensitive index lower()
@ 2016-12-20 10:02 loren.szendre@gmail.com
0 siblings, 1 reply; 2+ messages in thread
From: loren.szendre@gmail.com @ 2016-12-20 10:02 UTC (permalink / raw)
To: pgsql-docs
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/9.1/static/sql-createindex.html
Description:
In the section on indexes the documentation accurately describes how to
create an efficient, case-insensitive index using lower(field_name). But! in
Firebird to get a query to utilize such index, you must write the query as
such:
WHERE myfield = lower(:myfield)
Otherwise a table scan is performed. The documentation should state whether
or not such a thing is required. It's one thing to create an index, it's
quite another to know how to write a statement that guarantees that the
index will be used.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: case-insensitive index lower()
@ 2017-01-05 16:23 Bruce Momjian <bruce@momjian.us>
parent: loren.szendre@gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2017-01-05 16:23 UTC (permalink / raw)
To: loren.szendre@gmail.com; +Cc: pgsql-docs
On Tue, Dec 20, 2016 at 10:02:42AM +0000, loren.szendre@gmail.com wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.1/static/sql-createindex.html
> Description:
>
> In the section on indexes the documentation accurately describes how to
> create an efficient, case-insensitive index using lower(field_name). But! in
> Firebird to get a query to utilize such index, you must write the query as
> such:
>
> WHERE myfield = lower(:myfield)
>
> Otherwise a table scan is performed. The documentation should state whether
> or not such a thing is required. It's one thing to create an index, it's
> quite another to know how to write a statement that guarantees that the
> index will be used.
I don't see that as useful for the majority of people reading the
documentation. EXPLAIN will clearly show the index being used.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-01-05 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 10:02 case-insensitive index lower() loren.szendre@gmail.com
2017-01-05 16:23 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox