pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Case Insensitive
Date: Thu, 28 Mar 2019 04:08:48 -0500
Message-ID: <c316dc7f-1eed-ea88-558a-76f00ada79e8@gmail.com> (raw)
In-Reply-To: <150586A3-A8F4-4B80-9A4B-310DE265B4B3@blighty.com>
References: <CAGuFTBU1fACZWYdVwU-HiBJWAt2QFRa9fkB+SovmVMoUjVbekw@mail.gmail.com>
	<CADp-Sm4RWjbFQix1_XH7hstj6FY-EZj-f2veSgR_Z7Ut=tdDEA@mail.gmail.com>
	<c86c6b09-31fa-f27d-b373-3d604d4ca2a0@gmail.com>
	<150586A3-A8F4-4B80-9A4B-310DE265B4B3@blighty.com>

On 3/28/19 3:33 AM, Steve Atkins wrote:
>
>> On Mar 28, 2019, at 8:29 AM, Ron <ronljohnsonjr@gmail.com> wrote:
>>
>> On 3/28/19 3:23 AM, Sameer Kumar wrote:
>> [snip]
>>> You can write a query with upper function:
>>>
>>> select * from emp where upper(ename)=upper('aaa');
>> That's a guaranteed table scan.
> Unless you have an index on upper(ename).

Are you sure?  I thought the lpart had to be immutable for the query 
optimizer to decide to use an index (and upper(ename) is mutable).

-- 
Angular momentum makes the world go 'round.





view thread (19+ messages)  latest in thread

Message-ID: <c316dc7f-1eed-ea88-558a-76f00ada79e8@gmail.com>
Permalink:  ../c316dc7f-1eed-ea88-558a-76f00ada79e8@gmail.com/
Also on:    postgresql.org/message-id/c316dc7f-1eed-ea88-558a-76f00ada79e8@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-general@lists.postgresql.org
  Subject: Re: Case Insensitive
  In-Reply-To: <c316dc7f-1eed-ea88-558a-76f00ada79e8@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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