System:
------------
PHP 4.4.1
Apache 1.3.34
Drupal CVS-HEAD
Postgresql 8.0.4

Problem:
-------------

When trying to create a new category in 'contact form' module nothing happens and I get these errors:
--------------------------------------------------------------------------------------------
/?q=admin/contact/edit
pg_query(): Query failed: ERROR: null value in column "cid" violates not-null constraint en la línea 78 del archivo /home/erl/drupal-cvs/includes/database.pgsql.inc.

/?q=admin/contact/edit
query: INSERT INTO contact (category, recipients, reply) VALUES ('test', 'test@linux-es.org', 'test') en la línea 95 del archivo /home/erl/drupal-cvs/includes/database.pgsql.inc.
--------------------------------------------------------------------------------------------

This error makes the contact module useless if you are using postgresql as the database. Thanks for your time.

Comments

Cvbge’s picture

I cannot reproduce this.
Please try with newest cvs version, there was a fix for contact.module recently.
Also, have you upgraded from 4.6 or installed from scratch?

ralfm’s picture

I was using the cvs version from scratch (05.11.2005).

I have installed the last cvs version and this works ok now. This is the patch need it

--- drupal-cvs_05_11_2005/database/database.pgsql Sat Nov 5 14:00:03 2005
+++ drupal-cvs_12_11_2005/database/database.pgsql Tue Nov 8 13:02:23 2005
@@ -199,7 +199,7 @@
--

CREATE TABLE contact (
- cid int NOT NULL,
+ cid SERIAL,
category varchar(255) NOT NULL default '',
recipients text NOT NULL default '',
reply text NOT NULL default '',

Cvbge’s picture

Status: Active » Closed (fixed)

Then it's fixed.