Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-328

EPSG factory on PostgreSQL fails because of missing cast

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.8
    • Component/s: Referencing
    • Labels:
      None
    • Environment:

      PostgreSQL

      Description

      The EPSG factory works as expected on Derby. But attempt to use the factory on PostgreSQL sometime produces the following error message:

      ERROR: operator does not exist: epsg."CRS Kind" ~~ unknown
      SQL state: 42883
      Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      

      The issue occurs in expressions like coord_ref_sys_kind LIKE 'projected%' with the coord_ref_sys_kind column defined as an enum when Apache SIS is using PostgreSQL. The fix is to cast the CRS Kind enum to VARCHAR(24). The bug does not happen in Derby because that column is already a VARCHAR(24) since Derby does not support enums.

        Attachments

          Activity

            People

            • Assignee:
              desruisseaux Martin Desruisseaux
              Reporter:
              desruisseaux Martin Desruisseaux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: