Modify ↓
#6670 closed defect (duplicate)
Broken query in Browse Source (postgres) - r6396
| Reported by: | Owned by: | Christian Boos | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | version control | Version: | 0.11b1 |
| Severity: | normal | Keywords: | query, cache, postgresql |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Postgres will not automatically cast an integer to a text field. Consequently, the query in versioncontrol/cache.py:CachedChangeset
cursor = self.db.cursor()
cursor.execute("SELECT time,author,message FROM revision "
"WHERE rev=%s", (rev,))
Will fail as rev needs to be stringified with str(rev). It is cast in other places in cache.py so it's just a syntax bug.
"WHERE rev=%s", (str(rev),)) works perfectly.
This is in Postgres 8.3beta4.
Attachments (0)
Change History (4)
follow-up: 3 comment:1 by , 18 years ago
comment:2 by , 18 years ago
| Milestone: | 0.11 |
|---|---|
| Resolution: | → duplicate |
| Status: | new → closed |
Sure, thanks for noticing.
comment:3 by , 18 years ago
Replying to marcin.owsiany@guardian.co.uk:
Isn't this a duplicate of #6274 ?
Yes it is. I search up a storm but didn't find anything relating to this bug. Sorry.
comment:4 by , 11 years ago
| Keywords: | postgresql added; postgres removed |
|---|
Note:
See TracTickets
for help on using tickets.



Isn't this a duplicate of #6274 ?