pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Pang (chaolpan) <chaolpan@cisco.com>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: Postgresql equal join on function with columns not use index
Date: Tue, 13 Jun 2023 09:50:48 -0400
Message-ID: <1527099.1686664248@sss.pgh.pa.us> (raw)
In-Reply-To: <PH0PR11MB51914E757855701122588DA1D654A@PH0PR11MB5191.namprd11.prod.outlook.com>
References: <PH0PR11MB5191F00EB9B2EDB86616B442D654A@PH0PR11MB5191.namprd11.prod.outlook.com>
	<1166864.1686575919@sss.pgh.pa.us>
	<PH0PR11MB51914E757855701122588DA1D654A@PH0PR11MB5191.namprd11.prod.outlook.com>

"James Pang (chaolpan)" <chaolpan@cisco.com> writes:
>     Looks like it's the function "regexp_replace" volatile and restrict=false make the difference,  we have our application role with default search_path=oracle,$user,public,pg_catalog.    
>      =#    select oid,proname,pronamespace::regnamespace,prosecdef,proisstrict,provolatile from pg_proc where proname='regexp_replace' order by oid;
>   oid  |    proname     | pronamespace | prosecdef | proisstrict | provolatile
> -------+----------------+--------------+-----------+-------------+-------------
>   2284 | regexp_replace | pg_catalog   | f         | t           | i
>   2285 | regexp_replace | pg_catalog   | f         | t           | i
>  17095 | regexp_replace | oracle       | f         | f           | v 
>  17096 | regexp_replace | oracle       | f         | f           | v
>  17097 | regexp_replace | oracle       | f         | f           | v
>  17098 | regexp_replace | oracle       | f         | f           | v

Why in the world are the oracle ones marked volatile?  That's what's
preventing them from being used in index quals.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <1527099.1686664248@sss.pgh.pa.us>
Permalink:  ../1527099.1686664248@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1527099.1686664248@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chaolpan@cisco.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Postgresql equal join on function with columns not use index
  In-Reply-To: <1527099.1686664248@sss.pgh.pa.us>

* 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