activerecord-jdbc
  1. activerecord-jdbc
  2. ACTIVERECORD_JDBC-104

table_alias_length not working in PostgreSQL (with 8.3 at least)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 1.0.0
    • Component/s: PostgreSQL
    • Labels:
      None
    • Environment:

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

      Description

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Gregor Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: