Edgewall Software
Modify

Opened 9 years ago

Closed 8 years ago

#12209 closed defect (fixed)

Cannot save notify_subscription in PostgreSQL

Reported by: Franz Mayer <franz.mayer@…> Owned by: Jun Omae
Priority: normal Milestone: 1.2
Component: notification Version: 1.1.6
Severity: major Keywords: postgresql
Cc: Branch:
Release Notes:

Fix not working notification preference panel with PostgreSQL.

API Changes:
Internal Changes:

Description

When trying to save subscriptions in notification preference panel I am getting an error:

Trac detected an internal error:

ProgrammingError: operator does not exist: integer = boolean
LINE 2: ...                   WHERE sid='framay' AND authenticated=true
                                                                  ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

trac.log shows the full SQL:

2015-09-21 15:16:45,165 Trac[build\bdist.win32\egg\trac\db\util] DEBUG: SQL:                     SELECT id, distribu
tor, class FROM notify_subscription
                    WHERE sid=%s AND authenticated=%s
2015-09-21 15:16:45,165 Trac[build\bdist.win32\egg\trac\db\util] DEBUG: args: (u'framay', True)

I am using PostgreSQL, where the column authenticated is of type integer, thus above SQL is not correct, also the insert statement later in the method Subscription.replace_all.

Attachments (1)

ticket-14571.patch (23.7 KB ) - added by ebray 8 years ago.
FWIW this bug still exists in Trac 1.1.6 (I realize a 1.1.x release simply hasn't been made since this fix was merged). So if anyone is running Trac 1.1.6 and runs into this, I am attaching a patch for this that applies cleanly to Trac 1.1.6.

Download all attachments as: .zip

Change History (7)

comment:1 by Ryan J Ollos, 9 years ago

Milestone: 1.2

Confirmed.

comment:2 by figaro, 8 years ago

Keywords: postgresql added; postgres removed

comment:3 by Ryan J Ollos, 8 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:4 by Jun Omae, 8 years ago

Owner: changed from Ryan J Ollos to Jun Omae

We should add unit tests for Subscription class…. I'll try to fix it.

comment:5 by Jun Omae, 8 years ago

Release Notes: modified (diff)

Proposed changes in log:jomae.git@t12209.

comment:6 by Jun Omae, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [14571].

by ebray, 8 years ago

Attachment: ticket-14571.patch added

FWIW this bug still exists in Trac 1.1.6 (I realize a 1.1.x release simply hasn't been made since this fix was merged). So if anyone is running Trac 1.1.6 and runs into this, I am attaching a patch for this that applies cleanly to Trac 1.1.6.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae 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.