Opened 8 years ago

Closed 8 years ago

# postgres bug fix [PATCH]

Reported by: Owned by: Shane Caraveo Michael Renzmann normal TracPastePlugin normal 0.11

### Description

The latest change broke compatibility with the LIMIT clause, it needs to be LIMIT X OFFSET X rather than LIMIT X,X. Patch to come.

### comment:1 Changed 8 years ago by Michael Renzmann

Owner: changed from mitsuhiko to Michael Renzmann new → assigned 0.10 → 0.11

Thanks for the patch, will look at it.

### comment:2 Changed 8 years ago by Michael Renzmann

Hmm... the LIMIT x,x syntax was also used before r4891. Did earlier revisions really work for you?

I did a quick test, and your patch seems to break the "Recent Pastes" functionality when using SQLite. I'll give it a closer look, but likely not before sometimes next week.

### comment:3 Changed 8 years ago by Shane Caraveo

well, I svn updated today, after which I got the following error just accessing /pastebin:

Trac detected an internal error:

ProgrammingError: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.

Making the change allowed me to bring up pastebin, but I haven't tested beyond that. One other change on my end, updated pg 8.3.4 to 8.3.5.

### comment:4 Changed 8 years ago by Michael Renzmann

Resolution: → fixed assigned → closed

(In [4894]) TracPastePlugin: Correct use of LIMIT and OFFSET in limit_clause, to make it compatible (again?) with PostgreSQL. While at it, allow the offset to be set as additional filter when calling the method.

Thanks to mixedpuppy for reporting this issue.

Closes #4178.

### Modify Ticket

Action
as closed The owner will remain Michael Renzmann.
The resolution will be deleted. Next status will be 'reopened'.