42601, 7, ERROR: cannot insert multiple commands into a prepared statement
UPDATE
As of the latest commit, I identified that moving the SQL before the declaration for soundex fixes the previous error (which was still occurring with the removal of enums)
After shifting the com_cronjobs SQL statements to before the soundex declaration, the installation fails with:
42601, 7, ERROR: unterminated dollar-quoted string at or near "$$ BEGIN CREATE TYPE job_type AS enum ('script', 'plugin')" LINE 2: $$ ^
42601, 7, ERROR: syntax error at or near "EXCEPTION" LINE 1: EXCEPTION ^
42601, 7, ERROR: unterminated dollar-quoted string at or near "$$" LINE 2: $$ ^
42601, 7, ERROR: unterminated dollar-quoted string at or near "$$ BEGIN CREATE TYPE trigger_type AS enum ('pseudo_cron', 'cron', 'visit_count')" LINE 2: $$ ^
Without the DO $$ block required for exception handling, installation/update scripts will fail if the types job_type / trigger already exist. Otherwise, the types are created successfully and installation completes.
Expected result
Joomla is able to run the DB complete scripts and complete installation.
Actual result
DB scripts fail when it gets to the ENUM type declarations.
Steps to reproduce the issue
Try installing Joomla with a PostgreSQL database and commit hash b130fc21cb7eea618f31d0011d4e093efcedd88e (branch
plgapi
). The installation fails with:UPDATE
As of the latest commit, I identified that moving the SQL before the declaration for
soundex
fixes the previous error (which was still occurring with the removal of enums)soundex
declaration, the installation fails with:job_type
/trigger
already exist. Otherwise, the types are created successfully and installation completes.Expected result
Joomla is able to run the DB complete scripts and complete installation.
Actual result
DB scripts fail when it gets to the ENUM type declarations.
System information (as much as possible)
Additional comments
DO $$ BEGIN CREATE TYPE trigger_type AS enum ('pseudo_cron', 'cron', 'visit_count'); EXCEPTION WHEN duplicate_object THEN NULL; END $$;