Re: Dont let those int8's drive you mad!!

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Dont let those int8's drive you mad!!
Дата
Msg-id 41B0FFB2.8020003@commandprompt.com
обсуждение исходный текст
Ответ на Dont let those int8's drive you mad!!  (Jeff Amiel <jamiel@istreamimaging.com>)
Список pgsql-general
>
> update transactions set state='O' where trans_id=int8(14332)
>
> Sped it up from 4 milliseconds to .07 milliseconds (and obviously now
> did an index scan)!!!!
> This HAS bitten me before.
> Questions:
> If postgres knows the field is an int8, why do I have to cast it in my
> query?

That is a long answer.

> Any way I can avoid having to watch for this particular column (and 3
> others in other tables) column in all my queries?

1. Automatically cast all your queries
2. Quote all parameters.

>
>
>
>
>
>
>


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: initdb error: "could not identify current directory" (or, what have i done now?)
Следующее
От: OpenMacNews
Дата:
Сообщение: Re: initdb error: "could not identify current directory" (or,