I got the following errors when trying to install the Activity Stream core module:

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "lastfetch" is of type timestamp without time zone but default expression is of type integer HINT: You will need to rewrite or cast the expression. in /usr/share/php/drupal/includes/database.pgsql.inc on line 139.
    * user warning: query: CREATE TABLE activitystream_accounts ( uid int_unsigned NOT NULL default 0, module varchar(255), userid varchar(255), password varchar(255), feed varchar(255), lastfetch timestamp without time zone NOT NULL default 0 ) in /usr/share/php/drupal/includes/database.inc on line 515.

To fix this in a database-agnostic way, I would recommend changing the default to an actual date/time value that is recognizable by both mysql and postgres, such as the epoch+1 second: "1970-01-01 00:00:01"

Attaching a patch to do exactly that.

CommentFileSizeAuthor
#3 activitystream.install.patch1 KBbderrly
activitystream.install.patch1006 bytesAnonymous (not verified)

Comments

akalsey’s picture

Status: Patch (to be ported) » Needs review

Can anyone review this and ensure this fixes Postgres?

bderrly’s picture

Status: Needs review » Reviewed & tested by the community

I just tested the patch on an install of 6.x-1.0-rc2 and it worked. Thanks for the patch curtis.

bderrly’s picture

StatusFileSize
new1 KB

Actually, after some errors I've found a spelling error in the original code that wasn't caught in with the patch either.

akalsey’s picture

Status: Reviewed & tested by the community » Fixed

The move to the schema system and away from SQL queries should have fixed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.