pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedLike with special character
6+ messages / 6 participants
[nested] [flat]
* Like with special character
@ 2006-05-01 07:37 tnodev <tnodev@free.fr>
0 siblings, 2 replies; 6+ messages in thread
From: tnodev @ 2006-05-01 07:37 UTC (permalink / raw)
To: pgsql-sql
Hello,
I'm using postGre with tables which contain French character (éèçàù...).
Is there a fonction which performs a like in replacing é (e cute) by e ?
thanks...
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Like with special character
@ 2006-05-01 08:51 Guillaume LELARGE <guillaume.lelarge@gmail.com>
parent: tnodev <tnodev@free.fr>
1 sibling, 0 replies; 6+ messages in thread
From: Guillaume LELARGE @ 2006-05-01 08:51 UTC (permalink / raw)
To: tnodev <tnodev@free.fr>; +Cc: pgsql-sql
Hi,
tnodev a écrit :
> I'm using postGre with tables which contain French character (éèçàù...).
> Is there a fonction which performs a like in replacing é (e cute) by e ?
>
select translate('forêt', 'àâäéèêëîïôöùûü', 'aaaeeeeiioouuu');
Change the first word (forêt) by the string you want characters to be
replaced.
For more, see :
http://docs.postgresqlfr.org/pgsql-8.1.3-fr/functions-string.html
(french docs)
http://www.postgresql.org/docs/8.1/interactive/functions-string.html
(english docs)
BTW, it is PostgreSQL, not postGre.
Regards,
--
Guillaume.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Like with special character
@ 2006-05-01 12:55 Oleg Bartunov <oleg@sai.msu.su>
parent: tnodev <tnodev@free.fr>
1 sibling, 2 replies; 6+ messages in thread
From: Oleg Bartunov @ 2006-05-01 12:55 UTC (permalink / raw)
To: tnodev <tnodev@free.fr>; +Cc: pgsql-sql
On Mon, 1 May 2006, tnodev wrote:
> Hello,
>
> I'm using postGre with tables which contain French character (?????...). Is
> there a fonction which performs a like in replacing ? (e cute) by e ?
to_ascii() should helps you
>
> thanks...
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Like with special character
@ 2006-05-01 14:35 TNO <tnodev@free.fr>
parent: Oleg Bartunov <oleg@sai.msu.su>
1 sibling, 0 replies; 6+ messages in thread
From: TNO @ 2006-05-01 14:35 UTC (permalink / raw)
To: ; +Cc: pgsql-sql
Perfect, thanks
I found regex for postgreSql too, it's interesting too
select * from divers
where s_libelle ~* '^t(e|é|ê)'
Oleg Bartunov a écrit :
> On Mon, 1 May 2006, tnodev wrote:
>
>> Hello,
>>
>> I'm using postGre with tables which contain French character
>> (?????...). Is there a fonction which performs a like in replacing ?
>> (e cute) by e ?
>
> to_ascii() should helps you
>
>>
>> thanks...
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: explain analyze is your friend
>>
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
> Sternberg Astronomical Institute, Moscow University, Russia
> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(495)939-16-83, +007(495)939-23-83
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>
>
--
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Like with special character
@ 2006-07-18 18:17 Emi Lu <emilu@encs.concordia.ca>
parent: Oleg Bartunov <oleg@sai.msu.su>
1 sibling, 1 reply; 6+ messages in thread
From: Emi Lu @ 2006-07-18 18:17 UTC (permalink / raw)
To: ; +Cc: pgsql-sql
>
>
>> I'm using postGre with tables which contain French character
>> (?????...). Is there a fonction which performs a like in replacing ?
>> (e cute) by e ?
>
> to_ascii() should helps you
I got the following error:
select to_ascii('ê');
ERROR: encoding conversion from UNICODE to ASCII not supported
Some comments about it.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Like with special character
@ 2006-07-18 19:05 Osvaldo Kussama <osvaldo_kussama@yahoo.com.br>
parent: Emi Lu <emilu@encs.concordia.ca>
0 siblings, 0 replies; 6+ messages in thread
From: Osvaldo Kussama @ 2006-07-18 19:05 UTC (permalink / raw)
To: emilu@encs.concordia.ca; pgsql-sql
Emi Lu <emilu@encs.concordia.ca> escreveu:
>
>
>> I'm using postGre with tables which contain French character
>> (?????...). Is there a fonction which performs a like in replacing ?
>> (e cute) by e ?
>
> to_ascii() should helps you
I got the following error:
select to_ascii('ê');
ERROR: encoding conversion from UNICODE to ASCII not supported
Some comments about it.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2006-07-18 19:05 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-01 07:37 Like with special character tnodev <tnodev@free.fr>
2006-05-01 08:51 ` Guillaume LELARGE <guillaume.lelarge@gmail.com>
2006-05-01 12:55 ` Oleg Bartunov <oleg@sai.msu.su>
2006-05-01 14:35 ` TNO <tnodev@free.fr>
2006-07-18 18:17 ` Emi Lu <emilu@encs.concordia.ca>
2006-07-18 19:05 ` Osvaldo Kussama <osvaldo_kussama@yahoo.com.br>
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