pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems when using unaccent
2+ messages / 2 participants
[nested] [flat]

* Problems when using unaccent
@ 2024-01-02 04:12 PG Doc comments form <noreply@postgresql.org>
  2024-01-02 16:43 ` Re: Problems when using unaccent Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2024-01-02 04:12 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: jansenmauro@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/unaccent.html
Description:

I'm trying to query a database with unaccent, but PostgreSQL gives me
exceptions:

ERROR:  function unaccent(character varying) does not exist at character
139
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.
STATEMENT:  SELECT "cidades"."id", "cidades"."nome", "cidades"."populacao",
"cidades"."estado_id", "cidades"."complemento" FROM "cidades" WHERE
UPPER(UNACCENT("cidades"."nome")::text) LIKE '%' ||
UPPER(REPLACE(REPLACE(REPLACE((UNACCENT('ara')), E'\\', E'\\\\'), E'%',
E'\\%'), E'_', E'\\_')) || '%' ORDER BY "cidades"."nome" ASC LIMIT 21

This query is being generated according to parameters passed by Django.
Example:

cidades.filter(**{'nome__unaccent__icontains': termo_selecao_cidade})


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Problems when using unaccent
  2024-01-02 04:12 Problems when using unaccent PG Doc comments form <noreply@postgresql.org>
@ 2024-01-02 16:43 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-01-02 16:43 UTC (permalink / raw)
  To: jansenmauro@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> I'm trying to query a database with unaccent, but PostgreSQL gives me
> exceptions:

> ERROR:  function unaccent(character varying) does not exist at character
> 139

It looks like you haven't installed the unaccent extension in that
database.  See

https://www.postgresql.org/docs/current/contrib.html

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-01-02 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 04:12 Problems when using unaccent PG Doc comments form <noreply@postgresql.org>
2024-01-02 16:43 ` Tom Lane <tgl@sss.pgh.pa.us>

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