Re: Query inside RTF

Поиск
Список
Период
Сортировка
От Leonardo M." Ramé
Тема Re: Query inside RTF
Дата
Msg-id 1255034464.2739.1.camel@leonardo-laptop
обсуждение исходный текст
Ответ на Re: Query inside RTF  (Emanuel Calvo Franco <postgres.arg@gmail.com>)
Ответы Re: Query inside RTF  (Emanuel Calvo Franco <postgres.arg@gmail.com>)
Список pgsql-general
On jue, 2009-10-08 at 17:01 -0300, Emanuel Calvo Franco wrote:
> > select
> >  *
> > from my_table
> > where
> >  cast(rtf_field as varchar) like '%condition%'
> >
> > This works ok when the condition doesn't include accented chars. RTF
> > escapes accented characters as "\'f1" for í, "\'f3" for ó, and so on.
> >
> > To escape \ and ', I'd read it shuld be used \\ and '', so I thaugth
> > that a like '%diagn\\\\''f3stica%' should get "diagnóstica", but it
> > doesn't.
> >
>
> I prefer use
>
> select * from table where i_bytea::text ~~ $$%\\row%$$;
>
> Dollar quoting is more clean to put strings inside than ' '. ~~ is
> like operator.
> And :: operand is more clean to the syntax of the query.
> Don't think so? :)

It looks nice!, the only problem is I'm still forced to set
standard_conforming_strings = 1;


--
Leonardo M. Ramé
Griensu S.A. - Medical IT Córdoba
Tel.: 0351-4247979


В списке pgsql-general по дате отправления:

Предыдущее
От: Andreas Kalsch
Дата:
Сообщение: Using pg_catalog to define things across schemas
Следующее
От: Emanuel Calvo Franco
Дата:
Сообщение: Re: Query inside RTF