(also applies to 6.x-1.4-beta2)
error message:

warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "x_image" does not exist in /.../.../.../.../drupal/includes/database.pgsql.inc on line 138.
user warning: query: SELECT count(*) FROM x_image WHERE uid = 1 in /.../.../.../.../drupal/sites/all/modules/photos/photos.module on line 1294.

Environment:
Drupal 6.6
DB: PostgreSQL database 8.2.6
PHP 5.2.6RC1-pl1-gentoo
PHP memory limit 312M
Web server Apache

The problem only occurs when activating (installing) the module. what is happening? I seem to be the only one with this problem.
Thanks

Comments

gimpel’s picture

Same here, also using postgresql.

Anonymous’s picture

Subscribing. I'll check this out.

eastcn’s picture

Table x_image existence?

akc42’s picture

I have the same problem - also using Postgres. The is no x_image table. What module is supposed to create it?

akc42’s picture

OK I am beginning to understand. But first another problem

There is no uninstall hook in the in the photos.install file. This means I can't re-install it again, because I can't un-install it.

The reason I want to uninstall it is that the install schema that creates the x_image table specifies a tiny int of length 1, and as far as I can work out from Schema API the code for postgres, this would create some SQL that looks like this for creating the num field within table x_image.

num smallint(1)

This is invalid syntax for postgres and it would fail.

Whether this is a fault with the schema, or the postgres interpretation of it, I am not sure.

I would like to try removing this length specification from the schema and see if it works.

akc42’s picture

Version: 6.x-2.5-beta3 » 6.x-1.4-beta2

I realise I didn't report these errors with the right version. I am using 6.x-1.4-beta2

Also I have changed the photos.install file to remove the length criteria on every field, and to provide an uninstall hook, and I can now fully install the module.

I now have a problem creating an album, but I'll report that as another issue

nathaniel’s picture

Status: Active » Closed (fixed)

New maintainer, cleaning up old issues in issue queue.

Please try the latest version and re open if this is still a problem.