Issue Details (XML | Word | Printable)

Key: ACTIVERECORD_JDBC-104
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Gregor Schmidt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
activerecord-jdbc

table_alias_length not working in PostgreSQL (with 8.3 at least)

Created: 20/Apr/10 06:15 PM   Updated: 25/Sep/10 07:14 PM   Resolved: 25/Sep/10 07:14 PM
Component/s: PostgreSQL
Affects Version/s: 0.9.3
Fix Version/s: 1.0.0

Time Tracking:
Not Specified

File Attachments: 1. Text File 0001-Fixing-postgres-table_alias_length.patch (2 kB) 20/Apr/10 06:15 PM - Gregor Schmidt

Environment:

JRuby 1.4 and 1.5.0.RC1
PostgreSQL 8.3
Mac OS X 10.4


Tags: postgresql patch test


 Description  « Hide

Calculating the table_alias_length in the jdbc postgres adapter seems to be broken. This results in wrong truncation of generated field aliases (the things after "AS" in SQL - don't know the official name though) which would result in a wrong deserialization of the result.

In the attached diff, you may find a test and a working patch to fix the bug.

The diff may also be found on GitHub.

P.S.: Sorry for sending a pull request and reporting a bug. I did not want to bother. I was just not sure, which one would be easier for you.



There are no comments yet on this issue.