Re: problem with query
От | Chris Curvey |
---|---|
Тема | Re: problem with query |
Дата | |
Msg-id | CADfwSsCARi3JO-ZXXp13rp96Y6a2swfS+M9k-zRNVMujUdzZaQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: problem with query (Roberto Scattini <roberto.scattini@gmail.com>) |
Ответы |
Re: problem with query
Re: problem with query |
Список | pgsql-general |
On Thu, Sep 12, 2013 at 5:33 PM, Roberto Scattini <roberto.scattini@gmail.com> wrote:
On Thu, Sep 12, 2013 at 6:22 PM, Chris Curvey <chris@chriscurvey.com> wrote:On Thu, Sep 12, 2013 at 4:34 PM, Roberto Scattini <roberto.scattini@gmail.com> wrote:we are using postgresql 9.1 from ubuntu packages and the database encoding is (sadly) SQL_ASCIIcan anybody point me in the right direction to solve this issue?--
Roberto ScattiniIf you could tells what you are expecting, and what you are actually getting, that would be helpful.hi chris, sorry, the query with ilike '%NUÑEZ%' is returning 4 rows and the query with ilike '%nuñez%' is returning 0 rows.a simplified version of the query with his results:pgn=# set client_encoding = SQL_ASCII;SETpgon=# SELECT DISTINCTp.id, p.apellido, p.nombreFROM personal.personas AS pWHERE p.apellido ilike '%nuñez%';id | apellido | nombre----+----------+--------(0 rows)pgon=# SELECT DISTINCTp.id, p.apellido, p.nombreFROM personal.personas AS pWHERE p.apellido ilike '%NUÑEZ%';id | apellido | nombre-------+----------------+-----------------39489 | NUÑEZ | JUAN39937 | PEREZ NUÑEZ | FRANCISCO39498 | NUÑEZ ESQUIBEL | RICARDO RODOLFO40220 | NUÑEZ VERA | MANUEL SANTIAGO(4 rows)
Is this just a case-sentitvity issue? if personas.apellido is a varchar field, then I think that's your trouble. (it would have to be citext in order for "nunez" = "NUNEZ".)
В списке pgsql-general по дате отправления: