Re: valid use of wildcard

Поиск
Список
Период
Сортировка
От Irene Barg
Тема Re: valid use of wildcard
Дата
Msg-id 490F3754.7030802@noao.edu
обсуждение исходный текст
Ответ на Re: valid use of wildcard  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
The 'real' problem was the database had not been re-indexed in a long
while (it is a test system). After re-indexing the db, the query below
ran fairly quicky:

>>> metadata=# SELECT * FROM viewspace.siap AS t WHERE
>>> t."startDate"='2008-10-27%' AND t.prop_id LIKE '%' LIMIT 1000;

The 'startDate' is a timestamp. I was just questioning the use of the
'=' operator with '%' instead of LIKE. I would have expected the '=' to
take the '%' as a literal.

Thanks Tom, Klint and Scott. I learned some debugging tips from this post.

--irene

Tom Lane wrote:
> Klint Gore <kgore4@une.edu.au> writes:
>> Surprisingly, '2008-10-27%' casts to a date in 8.3.3.
>
> Yeah, the datetime input code is pretty willing to overlook unexpected
> punctuation.  There are enough odd formats out there that I'm not sure
> tightening it up would be a good idea.
>
>             regards, tom lane

--
---------------------------------------------------------------------
Irene Barg                    Email:  ibarg@noao.edu
NOAO/AURA Inc.                 http://www.noao.edu/noao/staff/ibarg
950 N. Cherry Ave.            Voice:  520-318-8273
Tucson, AZ  85726 USA           FAX:  520-318-8360
---------------------------------------------------------------------

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

Предыдущее
От: "Eduardo Arévalo"
Дата:
Сообщение: Error en generar base espacial
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Error en generar base espacial