Postgres casting issues with 'deleted' column updates

Bug #793717 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince

Bug Description

I'm getting a variety of casting issues when running smoke tests with Postgres. Several calls in the DB api throw exceptions like:

LINE 1: ...='2011-06-06T18:26:33.641652'::timestamp, deleted=1 WHERE ke...
                                                             ^
HINT: You will need to rewrite or cast the expression.
 'UPDATE key_pairs SET updated_at=updated_at, deleted_at=%(deleted_at)s, deleted=%(deleted)s WHERE key_pairs.user_id = %(user_id_1)s' {'deleted': 1, 'user_id_1': 'test806927user', 'deleted_at': datetime.datetime(2011, 6, 6, 18, 26, 33, 641652)}

---

We need to update several of the DB API calls so that they use True/False instead of 0/1 when updating the 'deleted' column attributes.

Related branches

Dan Prince (dan-prince)
Changed in nova:
status: New → In Progress
assignee: nobody → Dan Prince (dan-prince)
Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → Medium
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.