From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | loumour(at)gmail(dot)com |
Subject: | BUG #15272: creating an index function terminate with error |
Date: | 2018-07-10 13:49:49 |
Message-ID: | 153123058927.1406.13850916810995839008@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 15272
Logged by: karim loumour
Email address: loumour(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2018-07-10 13:50:47 | Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation |
Previous Message | PG Bug reporting form | 2018-07-10 08:59:03 | BUG #15271: Documentation / Error reporting on GUC parameter change |