Uploaded image for project: 'ID Generation'
  1. ID Generation
  2. IDGEN-119

UUID error on PostgreSQL with reference meta data module.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • 4.6.0
    • 4.6.0
    • None

    Description

      When starting reference metadata module you get an error with logs: https://pastebin.com/BHmcDSVf . It is due to the query :

      {{insert into idgen_auto_generation_option (uuid, identifier_type, location, source, manual_entry_enabled, automatic_generation_enabled, id) values ('47d1ba47-db31-4904-a140-cb9f4568f99c', 5, NULL, 1, 'FALSE', 'TRUE', 1) }}

      Looking closely at the logs, the error can be traced out to here where setting of uuid column in table auto_generation_option to UUID type in PostgreSQL occurs. For MySQL this gets converted to char(36) but since PostgreSQL has an explicit UUID type, it gets converted to it. Hence the error:

      ERROR - SqlExceptionHelper.logExceptions(142) |2020-07-23T18:47:54,280| Batch entry 0 insert into idgen_auto_generation_option (uuid, identifier_type, location, source, manual_entry_enabled, automatic_generation_enabled, id) values ('47d1ba47-db31-4904-a140-cb9f4568f99c', 5, NULL, 1, 'FALSE', 'TRUE', 1) was aborted:

      ERROR: column "uuid" is of type uuid but expression is of type character varying

      To resolve this convert UUID here to char(38) as is for other uuid like here.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                aman Aman Mishra
                aman Aman Mishra
                Daniel Kayiwa Daniel Kayiwa
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: