Re: Dont let those int8's drive you mad!! - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Dont let those int8's drive you mad!!
Date
Msg-id 41B0FFB2.8020003@commandprompt.com
Whole thread Raw
In response to Dont let those int8's drive you mad!!  (Jeff Amiel <jamiel@istreamimaging.com>)
List 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


Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb error: "could not identify current directory" (or, what have i done now?)
Next
From: OpenMacNews
Date:
Subject: Re: initdb error: "could not identify current directory" (or,