Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 9 years ago

#6670 closed defect (duplicate)

Broken query in Browse Source (postgres) - r6396

Reported by: mgohlke@… 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)

comment:1 by marcin.owsiany@…, 16 years ago

Isn't this a duplicate of #6274 ?

comment:2 by Christian Boos, 16 years ago

Milestone: 0.11
Resolution: duplicate
Status: newclosed

Sure, thanks for noticing.

in reply to:  1 comment:3 by anonymous, 16 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 Ryan J Ollos, 9 years ago

Keywords: postgresql added; postgres removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.