Re: Postgres mystery

From: Richard Huxton <dev(at)archonet(dot)com>
To: Shaun Clements <ShaunC(at)relyant(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres mystery
Date: 2005-03-30 07:41:22
Message-ID: 424A5822.8030301@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shaun Clements wrote:
> Can anyone tell me what the problem is here:
> I am inserting into a table via a stored procedure, to a few columns within
> the table and postgres is throwing a
> CANNOT EXECUTE NULL QUERY.
>
> <code snip>
> EXECUTE ''INSERT INTO table (column1, column2, column3,
> ''||quote_ident(column4)||'') values
> (''||quote_literal(RECORDNAME.column1)||'',''||quote_literal(RECORDNAME.colu
> mn2)||'',''''stringvalue'''',''||quote_literal(RECORDNAME.column2)||'')'';
> </code snip>
>
> Is this a bug, as I am ensuring that the NOT NULL columns are supplied, as
> well as one other.

I'm guessing one of your variables is null. Try explicitly checking all
of those.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-03-30 07:45:26 Re: Postgres mystery
Previous Message Klint Gore 2005-03-30 07:35:11 Re: Postgres mystery