Postgres install error

curtis - May 2, 2009 - 07:32
Project:Activity Stream
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

AttachmentSize
activitystream.install.patch1006 bytes

#1

akalsey - May 16, 2009 - 15:35
Status:patch (to be ported)» needs review

Can anyone review this and ensure this fixes Postgres?

#2

bderrly - May 25, 2009 - 22:00
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.

#3

bderrly - May 25, 2009 - 22:57

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

AttachmentSize
activitystream.install.patch 1 KB

#4

akalsey - November 10, 2009 - 00:24
Status:reviewed & tested by the community» fixed

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

#5

System Message - November 24, 2009 - 00:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.