pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Piotr Gasidło <quaker@barbara.eu.org>
To: pgsql-performance@postgresql.org
Subject: Re: Index on VARCHAR with text_pattern_ops inside PL/PGSQL procedure.
Date: Thu, 13 Dec 2007 12:41:40 +0100
Message-ID: <a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.gmail.com> (raw)
In-Reply-To: <475D37D9.3000208@barbara.eu.org>
References: <475D37D9.3000208@barbara.eu.org>

2007/12/10, Piotr Gasidło <quaker@barbara.eu.org>:
> Why PL/PGSQL is unable to proper utilize
> users_user_name_unique_text_pattern_ops?

I found solution, that satisfies me (EXECUTE is a bit ugly for me).

I've replaced LIKE operator with ~=~ operator. Now PL/PGSQL function
properly uses index on SELECT.


view thread (4+ messages)

Message-ID: <a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.gmail.com>
Permalink:  ../a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.gmail.com/
Also on:    postgresql.org/message-id/a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: quaker@barbara.eu.org
  Subject: Re: Index on VARCHAR with text_pattern_ops inside PL/PGSQL procedure.
  In-Reply-To: <a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.gmail.com>
  References: <475D37D9.3000208@barbara.eu.org> <a9eb4e580712130341y58f6c7c0j53166c0c788c32f4@mail.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