Re: Insert question null/not null serial, etc.

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Russ Schneider <russ(at)sugapablo(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert question null/not null serial, etc.
Date: 2004-01-31 22:43:22
Message-ID: 20040131224322.GA7024@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jan 31, 2004 at 04:56:58PM -0500, Russ Schneider wrote:

> 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?

Try DEFAULT. It will work on some cases if the NULL value was intended
to insert the default value, but will of course fail otherwise.

I wonder how much confidence you do have on a "port to Postgres" that
doesn't even actually work. You'll probably have lots of more work to
do to make it run, let alone be efficient.

Also, hasn't PHP Nuke had lots of security problems? Somebody else may
be able to suggest a better alternative ...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Find a bug in a program, and fix it, and the program will work today.
Show the program how to find and fix a bug, and the program
will work forever" (Oliver Silfridge)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-01-31 22:54:04 Re: Sorting is ignoring spaces
Previous Message Russ Schneider 2004-01-31 21:56:58 Insert question null/not null serial, etc.