I am running Drupal 4.7.2 with postgresql 8.0.3 after installing organic groups the install failed after enabling it in modules. I then looked at the og.install and did not see any switch statement for postgresql. I copied the sql regarding the tables and ran it as the db owner from psql.
Please see copies below:
CREATE TABLE og (
nid int NOT NULL,
selective int NOT NULL default '0',
description varchar(255) NULL,
image varchar(255) NULL,
theme varchar(255) NULL,
website varchar(255) NULL,
register int(1) NOT NULL default 0,
directory int(1) NOT NULL default 0,
language varchar(12) NOT NULL default '',
PRIMARY KEY (nid)
)
CREATE TABLE og_uid (
nid int NOT NULL,
og_role int NOT NULL DEFAULT 0,
is_active int NOT NULL DEFAULT 0,
is_admin int NOT NULL DEFAULT 0,
uid int( NOT NULL,
mail_type int NULL,
PRIMARY KEY (nid, uid)
)
This seem to have cured the problem but what worries me is the following in og.install :
$sql = "ALTER TABLE {node_access} DROP PRIMARY KEY, ADD INDEX `nid_gid_realm` ( `nid` , `gid` , `realm`)";
db_query($sql);
$sql = "ALTER TABLE {node_access} CHANGE grant_view grant_view int(11) unsigned NOT NULL default '0'";
db_query($sql);
$sql = "UPDATE {system} SET status = 1 WHERE name = 'og_basic'";