When installing the phpgedview integration module I received the following db/sql messages:

* warning: pg_query(): Query failed: ERROR: syntax error at or near "`" at character 44 in /var/www/www.foo.net/htdocs/includes/database.pgsql.inc on line 125.

* user warning: query: CREATE TABLE phpgedview_user_map ( `uid` int(10) NOT NULL default '0', `pgv` varchar(30) character set utf8 NOT NULL default '' ); in
/var/www/www.foo.net/htdocs/includes/database.pgsql.inc on line 144.

I am using Postgresql 7.4.7 (but I this problem probably will affect all Postgresql versions).

The problem is that the phpgedview.install script for postgresql is written using MySQL syntax.

Here is the correct code:

function phpgedview_install() {
  switch ($GLOBALS['db_type']) {
....
    case 'pgsql':
      db_query("CREATE TABLE {phpgedview_user_map} (
        uid int NOT NULL default '0',
        pgv varchar(30) NOT NULL DEFAULT ''
      );");
      break;
  }
}

Comments

karens’s picture

Status: Needs review » Closed (fixed)

The PhpGedView maintainers wanted this code moved to their repository, which is why there are no files here any more. I removed all the code from this project at their request. All further work must be done in the PhpGedView repository.

I'm closing the remaining issues and unpublishing the project page.