pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: loumour@gmail.com
Subject: BUG #15272: creating an index function terminate with error
Date: Tue, 10 Jul 2018 13:49:49 +0000
Message-ID: <153123058927.1406.13850916810995839008@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15272
Logged by:          karim loumour
Email address:      loumour@gmail.com
PostgreSQL version: 10.4
Operating system:   RHEL 7
Description:        

I created the function bellow :

CREATE OR REPLACE FUNCTION f_unaccent(text) RETURNS text AS $$
SELECT lower(unaccent('unaccent', $1))
$$  LANGUAGE sql IMMUTABLE;

I can call this function correctly :

select upper(f_unaccent(nom)) from geoname limit 10;
        upper         
----------------------
 CANAL LLISA
 TORRENT LLIMOIS
 BARRANC DEL LLEMPO
 CASA LLECSIA
 BORDA DEL LLECSIA
 PONT DEL LLARG
 FONTANAL LLARG
 CASA LLARG
 CANAL DEL LLARG
 TORRENT DE LA LLAMPA
(10 rows)

But, when i need to create an index using that function, i have the
following error:

dref=# create index geo_test on geoname(upper(f_unaccent(nom))) ;
ERROR:  function unaccent(unknown, text) does not exist
LINE 2: SELECT lower(unaccent('unaccent', $1))
                     ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.
QUERY:  
SELECT lower(unaccent('unaccent', $1))

CONTEXT:  SQL function "f_unaccent" during inlining



view thread (2+ messages)  latest in thread

Message-ID: <153123058927.1406.13850916810995839008@wrigleys.postgresql.org>
Permalink:  ../153123058927.1406.13850916810995839008@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/153123058927.1406.13850916810995839008@wrigleys.postgresql.org

 · 

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, loumour@gmail.com
  Subject: Re: BUG #15272: creating an index function terminate with error
  In-Reply-To: <153123058927.1406.13850916810995839008@wrigleys.postgresql.org>
  References: <153123058927.1406.13850916810995839008@wrigleys.postgresql.org>

* 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