Ticket #1223 (closed defect: fixed)

Opened 2 weeks ago

Last modified 2 weeks ago

[PATCH] Tag changes break PostgreSQL support

Reported by: bribera Assigned to: scott
Priority: high Milestone: 5.1
Component: backend Version:
Severity: blocker Keywords: posgresql
Cc: neuro

Description

The changes to tag.rb in 1686 introduced syntax that is invalid in PostgreSQL:

ActionView::TemplateError (PGError: ERROR:  LIMIT #,# syntax is not supported
HINT:  Use separate LIMIT and OFFSET clauses.
: 
      SELECT tags.id, tags.name, tags.display_name, COUNT(articles_tags.article_id) AS article_counter
      FROM tags tags LEFT OUTER JOIN articles_tags articles_tags
        ON articles_tags.tag_id = tags.id
      LEFT OUTER JOIN contents articles
        ON articles_tags.article_id = articles.id
      WHERE articles.published = 't'
      GROUP BY tags.id, tags.name, tags.display_name
      ORDER BY article_counter DESC 
      LIMIT 0, 25 
      ) on line #1 of vendor/plugins/tag_sidebar/views/content.rhtml:

This patch changes the syntax to a more compliant variation.

Attachments

safe_tag_order_limit.diff (0.6 kB) - added by bribera on 05/01/08 01:53:27.
Safe order/limit query for the tags model

Change History

05/01/08 01:53:27 changed by bribera

  • attachment safe_tag_order_limit.diff added.

Safe order/limit query for the tags model

05/01/08 11:12:21 changed by neuro

Fixed in rev 1690, thank you !

05/01/08 11:12:29 changed by neuro

  • status changed from new to closed.
  • resolution set to fixed.