Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5652 closed defect (fixed)

update fails after plugin is installed when using postgres backend

Reported by: george.slavov@… Owned by: coling
Priority: normal Component: ClientsPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11


There is a problem in the code in that prevents a successful update.

Postgres does not accept double quoted values as literals hence the section 'v5' needs to be updated using escaped single quotes.

Below is the corrected code (I have not tested this with anything other than postgres but it should work fine):

cursor.execute('INSERT INTO client_events '

'SELECT \'Weekly Summary\', \'Milestone Summary\', \'Send Email\', MAX(summary_lastupdate) ' 'FROM client')

cursor.execute('INSERT INTO client_event_action_options '

'SELECT \'Weekly Summary\', name, \'Email Addresses\', summary_list ' 'FROM client ' 'WHERE summary_list!=\'\)

cursor.execute('INSERT INTO client_events '

'SELECT \'Ticket Changes\', \'Ticket Change Summary\', \'Send Email\', MAX(changes_lastupdate) ' 'FROM client')

cursor.execute('INSERT INTO client_event_action_options '

'SELECT \'Ticket Changes\', name, \'Email Addresses\', changes_list ' 'FROM client ' 'WHERE changes_list!=\'\)

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by coling

  • Resolution set to fixed
  • Status changed from new to closed

(In [6473]) Hopefully fix some postgres issues.

Closes #5652, Refs #4805

comment:2 Changed 7 years ago by coling

(In [6474]) Partially revert r6473 (the part was not intended here).

Refs #5652 and #4805

Add Comment

Modify Ticket

as closed The owner will remain coling.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.