I'm a newbie to Drupal. I installed the Amazon module, activated it, and when I hit the "test" button, I get:

# warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "amazon_item" does not exist in /var/www/drupal-6.8/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT * FROM amazon_item ai WHERE ai.asin IN ('B00005LM0S') AND ai.timestamp > 0 in /var/www/drupal-6.8/sites/all/modules/amazon/amazon.module on line 285.

(and then a lot more error lines.)

How do I get the table created and added to that PHP file?

Comments

ccurvey’s picture

Category: support » bug

I'm using PostgreSQL, and it appears that there is a problem with the table definition for amazon_item. When you enable the amazon module, it tries to create a column of 'listpriceamount' with a type of 'real_unsigned', which is not valid. To fix:

1) Edit amazon.install.
2) Change line 23 (for 'listpriceamount') and set 'unsigned' => FALSE
3) While you are here, change line 22 (for 'releasedate') and set 'not null' => FALSE as well. (Not every Amazon item has a release date, see amazon item B00005LM0R -- a french press -- for an example)
4) Deactivate, uninstall, reactivate the Amazon product.

rfay’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of #590360: Update and test PostgreSQL Support. PostgreSQL is not fully supported, as you found out.