>
> 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