Insert question null/not null serial, etc.

From: Russ Schneider <russ(at)sugapablo(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Insert question null/not null serial, etc.
Date: 2004-01-31 21:56:58
Message-ID: Pine.LNX.4.50.0401311652580.14668-100000@dell.sugapablo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I downloaded the port for Postgres for PHP-NUKE.

All insert statements are as follows:

For table:
Table "nuke_referer"
Column | Type | Modifiers
--------+------------------------+----------------------------------------------------------
rid | integer | not null default
nextval('"nuke_referer_rid_seq"'::text)
url | character varying(100) | not null default ''
Primary key: nuke_referer_pkey

insert into nuke_referer values (NULL,'whatever');

Which gives me the error: "Warning: pg_exec(): Query failed: ERROR:
ExecAppend: Fail to add null value in not null attribute rid"

Since nowhere in the 3000 files of PHP-Nuke do they actually name columns
for insert commands, does anyone have any suggestions? Can NULL be
replaced with anything? (Keep in mind I'd like something I can globally
change, naming tables/columns individually is out of the question.)

--
[ Russ Schneider (a.k.a. Sugapablo) ]
[ http://www.sugapablo.com <--music ]
[ http://www.sugapablo.net <--personal ]
[ sugapablo(at)12jabber(dot)com <--jabber IM ]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-01-31 22:43:22 Re: Insert question null/not null serial, etc.
Previous Message elein 2004-01-31 20:16:30 Re: Two joins on same foreign key