Bugs: Browse | Submit New | Admin

[#11956] Regexp in CachedModel.find_by_sql Fails with Postgresql

Date:
2007-07-02 15:45
Priority:
3
Submitted By:
Michael Bryzek (mbryzek)
Assigned To:
Eric Hodel (drbrain)
Category:
cached_model
State:
Open
Summary:
Regexp in CachedModel.find_by_sql Fails with Postgresql

Detailed description
I'm running rails 1.2.3 with cached_model 1.3.1 and postgresql. The PG adapter does NOT always add "LIMIT 1"
to the SQL query when retrieving a single object. This causes the regexp to fail and the model to never get cached.

The bug is in line 149 of cached_model.rb. A patch for cached_model.rb is attached, though I have NOT run any regression
tests with the updated Regexp.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
patch.txt Patch to correct regexp Download

Changes:

Field Old Value Date By
File Added2192: patch.txt2007-07-02 15:45mbryzek