pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Case and accent insensitive
4+ messages / 4 participants
[nested] [flat]

* Case and accent insensitive
@ 2016-01-26 11:06 Max <maxabbr@yahoo.com.br>
  2016-01-26 17:22 ` Re: Case and accent insensitive rob stone <floriparob@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Max @ 2016-01-26 11:06 UTC (permalink / raw)
  To: pgsql-general

Is there a collation for case and accent insensitive filter? I just found the use of operators like ILIKE ou CITEXT module but I can't use ILIKE in the queries and the CITEXT is a field-by-field solution for the case insensitive part of the problem. I also found the unaccent text search dictionary that could help with the accent part.
In the MySQL world we have the database level collation latin1_swedish_ci where 'maca' = 'Maçã' is true and no field level configuration is required.
This database is hosted in Amazon Cloud so I'm also limited by what I can do in this environment.

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

* Re: Case and accent insensitive
  2016-01-26 11:06 Case and accent insensitive Max <maxabbr@yahoo.com.br>
@ 2016-01-26 17:22 ` rob stone <floriparob@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: rob stone @ 2016-01-26 17:22 UTC (permalink / raw)
  To: Max <maxabbr@yahoo.com.br>; pgsql-general

On Tue, 2016-01-26 at 11:06 +0000, Max wrote:
> Is there a collation for case and accent insensitive filter? I just
> found the use of operators like ILIKE ou CITEXT module but I can't
> use ILIKE in the queries and the CITEXT is a field-by-field solution
> for the case insensitive part of the problem. I also found
> the unaccent text search dictionary that could help with the accent
> part.
> 
> In the MySQL world we have the database level
> collation latin1_swedish_ci where 'maca' = 'Maçã' is true and no
> field level configuration is required.
> 
> This database is hosted in Amazon Cloud so I'm also limited by what I
> can do in this environment.


Have you considered storing the text in its HTML equivalent?

So "ma&ccedil;&atilde;" becomes "apple" in Portuguese.

You'd have to convert your query parameters before running the select.

My tuppence worth.

HTH
Robert


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* case and accent insensitive
@ 2018-03-23 22:04 MOISES ESPINOSA <moikmeg@gmail.com>
  2018-03-24 14:49 ` Re: case and accent insensitive Andreas Kretschmer <andreas@a-kretschmer.de>
  0 siblings, 1 reply; 4+ messages in thread

From: MOISES ESPINOSA @ 2018-03-23 22:04 UTC (permalink / raw)
  To: pgsql-general

Hi,

I need to reproduced the following Oracle functionality in PostgreSQL:

CREATE INDEX index_ciudad ON world.ciudad
((NLSSORT(NOMBRE29,'nls_sort=''GENERIC_BASELETTER''')));

I don't know how i could reproduced case insensitive and accent insensitive.

Is there any collate?

Thanks.

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

* Re: case and accent insensitive
  2018-03-23 22:04 case and accent insensitive MOISES ESPINOSA <moikmeg@gmail.com>
@ 2018-03-24 14:49 ` Andreas Kretschmer <andreas@a-kretschmer.de>
  0 siblings, 0 replies; 4+ messages in thread

From: Andreas Kretschmer @ 2018-03-24 14:49 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



Am 23.03.2018 um 23:04 schrieb MOISES ESPINOSA:
> I don't know how i could reproduced case insensitive and accent 
> insensitive.

Maybe you can use lower() for case insensitive or citext for the same 
(https://www.postgresql.org/docs/10/static/citext.html) and the 
unaccent-extension
for the accent insensitive 
(https://www.postgresql.org/docs/10/static/unaccent.html)

*untested*


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com





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


end of thread, other threads:[~2018-03-24 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 11:06 Case and accent insensitive Max <maxabbr@yahoo.com.br>
2016-01-26 17:22 ` rob stone <floriparob@gmail.com>
2018-03-23 22:04 case and accent insensitive MOISES ESPINOSA <moikmeg@gmail.com>
2018-03-24 14:49 ` Re: case and accent insensitive Andreas Kretschmer <andreas@a-kretschmer.de>

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