Hi this is the error:

warning: pg_query(): Query failed: ERROR: null value in column "accepted_timestamp" violates not-null constraint in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO og_invite (uid, mail, group_nid, sender, moderated, invite_key, token, timestamp) VALUES (0, 'examplemail@example.com', 7, 1, 0, 'nX6dTYhs78', 'dec90bf..::EXAMPLE-TOKEN::..e631b', 1333724817) in /usr/share/drupal6/includes/common.inc on line 3477.

While trying to recreate the db_query directly into postgresql database:
ERROR: null value in column "accepted_timestamp" violates not-null constraint

Checking on the "og_invite" table structure there's a value missing in the query.

I'm checking out the code right now, looks pretty simple to fix since the missing value for timestamp could be just a 0, maybe i'll have a patch this evening...

Any help is appreciated !!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

luisgrisolia’s picture

Hi, here's a patch i made to manage the problem, i'm not experienced coding drupal's but i'm a coder, i couldn't find the "INSERT" inside this code, but i noted the column in question ("accepted_timestamp") was set to "not NULL" and PostgreSQL was expecting for a value there... What i did was changing that column and subsequents querys realted with, very simple solution but maybe not quite addecuate.

Any feedback is appreciated for learning purposes !!

Liam Morland’s picture

Issue tags: +PostgreSQL

Tagging