Moodle
  1. Moodle
  2. MDL-32368

force pg to always use old bytea encoding

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Database SQL/XMLDB
    • Labels:

      Description

      in default pg install since 9.1 at least our DML tests fail because DB returns bytea in new hex format.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Eloy Lafuente (stronk7) added a comment -

            Grrr, just confirmed that "bytea_output" setting is not available in 8.3 nor 8.4.

            So I'm going to add one commit, using get_server_info(), that is statically cached, to be able to apply the new code only to PG 9.0 and upwards (surely also statically cached).

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Grrr, just confirmed that "bytea_output" setting is not available in 8.3 nor 8.4. So I'm going to add one commit, using get_server_info(), that is statically cached, to be able to apply the new code only to PG 9.0 and upwards (surely also statically cached). Ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated after adding 2 commits:

            1) @todo MDL-32392. About to delete the unused/nosense is_min_version() method.
            2) fix to perform the SET bytea_output = 'escape' only in postgresql 9.0 and upwards.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated after adding 2 commits: 1) @todo MDL-32392 . About to delete the unused/nosense is_min_version() method. 2) fix to perform the SET bytea_output = 'escape' only in postgresql 9.0 and upwards. Ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Tested both under 8.4 (me) and 9.1 (Petr), tests are passing ok. And documentation says that 9.0 also supports it:

            http://www.postgresql.org/docs/9.0/static/runtime-config-client.html

            So... passing. Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Tested both under 8.4 (me) and 9.1 (Petr), tests are passing ok. And documentation says that 9.0 also supports it: http://www.postgresql.org/docs/9.0/static/runtime-config-client.html So... passing. Ciao
            Hide
            Petr Skoda added a comment -

            thanks Eloy and sorry for the 8.x trouble

            Show
            Petr Skoda added a comment - thanks Eloy and sorry for the 8.x trouble
            Hide
            Dan Poltawski added a comment -

            Jolly good show!

            Your changes have made it into the Moodle release - its time to celebrate! I suggest a hot cup of English tea (with milk, no sugar) or a hoppy English ale.

            Tally-ho!

            Show
            Dan Poltawski added a comment - Jolly good show! Your changes have made it into the Moodle release - its time to celebrate! I suggest a hot cup of English tea (with milk, no sugar) or a hoppy English ale. Tally-ho!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: