No title

Started by Xavier Bugaudover 23 years ago2 messagesgeneral
Jump to latest
#1Xavier Bugaud
xavier.bugaud@parabolemaurice.com

might it be possible that "id" is not type integer/int4, e.g. numeric or

int8?

try this query:
rs2.executeUpdate("UPDATE my_table SET my_date=now() WHERE id='"+i+"'");

Yes !
you've got it... Now, postgres uses "Index Scan".

"id" is an int8. I didn't knew that it has to be quoted in order to be
interpreted into something else than an int4.

Thanks to everybody.

--
Xavier Bugaud

#2Mario Weilguni
mweilguni@sime.com
In reply to: Xavier Bugaud (#1)
Re:

"id" is an int8. I didn't knew that it has to be quoted in order to be
interpreted into something else than an int4.

IMO it's a good idea to quote all numerics regardless of type in postgres. as a side effect, it will allow the planer to make smarter choices for int8.