Oid is a reserved column name on PostgreSQL, and when enabled the i18nstrings module:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: column name "oid" conflicts with a system column name in /www/includes/database.pgsql.inc on line 138.

* user warning: query: CREATE TABLE i18n_strings ( lid int NOT NULL default 0, oid int NOT NULL default 0, type varchar(255) NOT NULL default '', property varchar(255) NOT NULL default 'default', PRIMARY KEY (lid) ) in /www/includes/database.inc on line 514.

Please, rename the column.

Comments

hass’s picture

Maybe we only need to add the oid into square brackets [oid]... I would wonder if you are not able to use this column name. Do you have any documentation?

zoltán balogh’s picture

The square brackets is not enough, because the name "oid" is a predefined system column.
Documentation: http://www.postgresql.org/docs/8.3/static/ddl-system-columns.html

Maybe a good solution is an issue to drupal core.
When the user using the postres, add "WITHOUT OIDS" clausa to all CREATE TABLE commands.

I created the table manually with "WITHOUT OIDS", and the modul is works fine.

hass’s picture

http://www.postgresql.org/docs/8.3/static/datatype-oid.html

OIDs are not added to user-created tables, unless WITH OIDS is specified when the table is created, or the default_with_oids configuration variable is enabled.

Is this a standard setting or your custom server configuration? I also thing we should ask the core developers to throw an error if such a columns is used... or at leased - CODER.module should throw errors!

hass’s picture

zoltán balogh’s picture

Is this a standard setting or your custom server configuration?

In the previous releases of Postgres (7.x series) WITH OIDS was the default. You can read this in the documentation of the version 7.4, at http://www.postgresql.org/docs/7.4/static/datatype-oid.html

Object identifiers (OIDs) are used internally by PostgreSQL as primary keys for various system tables. Also, an OID system column is added to user-created tables (unless WITHOUT OIDS is specified at table creation time).

My website provider using the 7.x release, so my default is WITH OIDS.

jose reyero’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta4
Status: Active » Fixed

Renamed the field to 'objectid'.

Thanks for all the information here. I'm not using pgsql, so I'm in the dark when it comes to that db.

Please, confirm it works (run update.php)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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