Basically, running the command Drush en on this module version caused the site to display only an error and no content. Drush also gave an error when trying to enable the module.

Below is what I saw from the terminal side. I am running an Amazon Cloud instance and PostgreSQL haven't had any issues with other modules this was the first error I have seen in the environment.

The following extensions will be enabled: block_class
Do you really want to continue? (y/n): y
WD php: PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "Array"                                                                                                   [error]
LINE 5:  PRIMARY KEY (Array, Array)
                      ^: CREATE TABLE {block_class} (
	module varchar(255) NOT NULL default '',
	delta varchar(255) NOT NULL default '',
	css_class varchar(255) NOT NULL default '',
	PRIMARY KEY (Array, Array)
); Array
(
)
 in db_create_table() (line 2685 of /var/dev.aws.XXXX.com/includes/database/database.inc).
Cannot modify header information - headers already sent by (output started at /usr/local/share/drush/includes/output.inc:37) bootstrap.inc:1239                                                  [warning]
PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "Array"
LINE 5:  PRIMARY KEY (Array, Array)
                      ^: CREATE TABLE {block_class} (
	module varchar(255) NOT NULL default '',
	delta varchar(255) NOT NULL default '',
	css_class varchar(255) NOT NULL default '',
	PRIMARY KEY (Array, Array)
); Array
(
)
 in db_create_table() (line 2685 of /var/dev.aws.XXXX.com/includes/database/database.inc).
Drush command terminated abnormally due to an unrecoverable error. 

Disabling the module via Drush will let your users back into the site as normal. It is not a mission critical module but it would have made some parts of the development easier.

Drupal version 7.14 as of today.

Thank you.

Comments

gmarus’s picture

Same problem here using block_class module with postgresql. Poking around, I saw this old thread:

http://drupal.org/node/616916

Perhaps a regression sneaked its way into a recent commit?

jamescdavis-1’s picture

Title: Drush en breaks site D7 - Amazon Cloud - PostgreSQL » PostgreSQL Incompatability
Priority: Major » Critical

I'm seeing the same issue with PostgreSQL 9.1 and Drupal 7.15 on CentOS 6.3. I've bumped the priority up to critical and generalized the issue title. I would really like to be able to use this module. If I get time, I will take a look and see if I can create a patch.

pumin’s picture

These are logs from PostgreSQL 9.1 (Drupal 7.15 on CentOS 5.5)

    676 LOG:  00000: statement: SELECT cid, data, created, expire, serialized FROM cache_bootstrap WHERE cid IN ('hook_info')
    677 LOCATION:  exec_simple_query, postgres.c:862
    678 ERROR:  42P01: relation "cache_bootstrap" does not exist at character 52
    679 LOCATION:  parserOpenTable, parse_relation.c:857
    680 STATEMENT:  SELECT cid, data, created, expire, serialized FROM cache_bootstrap WHERE cid IN ('hook_info')
    681 LOG:  00000: statement: BEGIN
    682 LOCATION:  exec_simple_query, postgres.c:862
    683 LOG:  00000: statement: SELECT 1 AS expression
    684         FROM
    685         cache_bootstrap cache_bootstrap
    686         WHERE ( (cid = 'hook_info') ) FOR UPDATE
    687 LOCATION:  exec_simple_query, postgres.c:862
    688 ERROR:  42P01: relation "cache_bootstrap" does not exist at character 30
    689 LOCATION:  parserOpenTable, parse_relation.c:857
    690 STATEMENT:  SELECT 1 AS expression
    691         FROM
    692         cache_bootstrap cache_bootstrap
    693         WHERE ( (cid = 'hook_info') ) FOR UPDATE
    694 LOG:  00000: statement: ROLLBACK
    695 LOCATION:  exec_simple_query, postgres.c:862
    696 ERROR:  42601: syntax error at or near "Array" at character 170
    697 LOCATION:  scanner_yyerror, scan.l:1001
    698 STATEMENT:  CREATE TABLE block_class (
    699                 module varchar(255) NOT NULL default '',
    700                 delta varchar(255) NOT NULL default '',
    701                 css_class varchar(255) NOT NULL default '',
    702                 PRIMARY KEY (Array, Array)
    703         )
    704 LOG:  00000: statement: BEGIN
    705 LOCATION:  exec_simple_query, postgres.c:862
    706 LOG:  00000: statement: SELECT 1 AS expression
    707         FROM
    708         sessions sessions
    709         WHERE ( (sid = 'n92RBmSkwRwq4d0nr-6s3J-qAWSeanS0WyF8ZbmTi0c') AND (ssid = '') ) FOR UPDATE
    710 LOCATION:  exec_simple_query, postgres.c:862
    711 ERROR:  42P01: relation "sessions" does not exist at character 30
    712 LOCATION:  parserOpenTable, parse_relation.c:857
    713 STATEMENT:  SELECT 1 AS expression
    714         FROM
    715         sessions sessions
    716         WHERE ( (sid = 'n92RBmSkwRwq4d0nr-6s3J-qAWSeanS0WyF8ZbmTi0c') AND (ssid = '') ) FOR UPDATE
    717 LOG:  00000: statement: ROLLBACK
    718 LOCATION:  exec_simple_query, postgres.c:862
    719 LOG:  00000: statement: SELECT column_name, data_type, column_default FROM information_schema.columns WHERE table_schema = 'public' AND table        _name = 'batch' AND (data_type = 'bytea' OR (numeric_precision IS NOT NULL AND column_default LIKE '%nextval%'))
    720 LOCATION:  exec_simple_query, postgres.c:862
    721 LOG:  00000: statement: UPDATE batch SET batch='a:13:{s:4:"sets";a:1:{i:0;a:15:{s:7:"sandbox";a:0:{}s:7:"results";a:0:{}s:7:"success";b:0;s:5        :"start";d:1348200899.6263029575347900390625;s:7:"elapsed";i:0;s:5:"title";s:20:"Replicating Database";s:8:"finished";s:27:"dbtng_migrator_ba        tch_report";s:4:"file";s:57:"sites/all/modules/dbtng_migrator/dbtng_migrator.batch.inc";s:12:"init_message";s:24:"Initializing.<br/>&nbsp;";s        :16:"progress_message";s:29:"Completed @current of @total.";s:13:"error_message";s:22:"An error has occurred.";s:3:"css";a:0:{}s:5:"total";i:        3;s:5:"count";i:2;s:5:"queue";a:2:{s:4:"name";s:18:"drupal_batch:108:0";s:5:"class";s:10:"BatchQueue";}}}s:16:"has_form_submits";b:0;s:10:"fo        rm_state";a:3:{s:10:"programmed";b:0;s:7:"rebuild";b:0;s:8:"redirect";N;}s:11:"progressive";b:1;s:11:"current_set";i:0;s:3:"url";s:5:"batch";        s:11:"url_options";a:1:{s:5:"query";a:1:{s:6:"render";s:7:"overlay";}}s:10:"source_url";s:30:"admin/structure/dbtng/migrator";s:8:"redirect";        N;s:5:"theme";s:5:"seven";s:17:"redirect_callback";s:11:"drupal_goto";s:2:"id";s:3:"108";s:13:"error_message";s:77:"Please continue to <a hre        f="/batch?id=108&amp;op=finished">the error page</a>";}'
    722         WHERE  (bid = '108')
    723 LOCATION:  exec_simple_query, postgres.c:862
    724 ERROR:  42P01: relation "batch" does not exist at character 8
    725 LOCATION:  parserOpenTable, parse_relation.c:857
    726 STATEMENT:  UPDATE batch SET batch='a:13:{s:4:"sets";a:1:{i:0;a:15:{s:7:"sandbox";a:0:{}s:7:"results";a:0:{}s:7:"success";b:0;s:5:"start";d:1        348200899.6263029575347900390625;s:7:"elapsed";i:0;s:5:"title";s:20:"Replicating Database";s:8:"finished";s:27:"dbtng_migrator_batch_report";        s:4:"file";s:57:"sites/all/modules/dbtng_migrator/dbtng_migrator.batch.inc";s:12:"init_message";s:24:"Initializing.<br/>&nbsp;";s:16:"progres        s_message";s:29:"Completed @current of @total.";s:13:"error_message";s:22:"An error has occurred.";s:3:"css";a:0:{}s:5:"total";i:3;s:5:"count        ";i:2;s:5:"queue";a:2:{s:4:"name";s:18:"drupal_batch:108:0";s:5:"class";s:10:"BatchQueue";}}}s:16:"has_form_submits";b:0;s:10:"form_state";a:        3:{s:10:"programmed";b:0;s:7:"rebuild";b:0;s:8:"redirect";N;}s:11:"progressive";b:1;s:11:"current_set";i:0;s:3:"url";s:5:"batch";s:11:"url_op        tions";a:1:{s:5:"query";a:1:{s:6:"render";s:7:"overlay";}}s:10:"source_url";s:30:"admin/structure/dbtng/migrator";s:8:"redirect";N;s:5:"theme        ";s:5:"seven";s:17:"redirect_callback";s:11:"drupal_goto";s:2:"id";s:3:"108";s:13:"error_message";s:77:"Please continue to <a href="/batch?id        =108&amp;op=finished">the error page</a>";}'
    727         WHERE  (bid = '108')
berenddeboer’s picture

Status: Active » Closed (duplicate)

Fixed in #1447108: PDO Exception when installing module with SQL Server 2008 R2.

The 1.2 version should be available for download shortly.

berenddeboer’s picture

Issue summary: View changes

adjusting url info