Re: Postgres CTE issues - Mailing list pgsql-sql

From Shekar Tippur
Subject Re: Postgres CTE issues
Date
Msg-id CAHmfATowaL7LdZkQ9c81tCiGLtOBRbmvzFP1JgntTe7Ak22vHg@mail.gmail.com
Whole thread Raw
In response to Re: Postgres CTE issues  (Marc Mamin <M.Mamin@intershop.de>)
Responses Re: Postgres CTE issues
List pgsql-sql
Marc,

I have changed the table C:

create table C (                                     

 "id" SERIAL PRIMARY KEY,

 name varchar(40)

 , b_id integer references B(id) DEFERRABLE INITIALLY DEFERRED  NOT NULL);


I still get the same error:

insert into A (var1, var2) values ('Hello1', 'World1');

ERROR:  null value in column "b_id" violates not-null constraint

DETAIL:  Failing row contains (2, World1, null).

CONTEXT:  SQL statement "INSERT INTO C (name, b_id) VALUES (NEW.var2, b_id)"

PL/pgSQL function fn_test() line 17 at SQL statement

pgsql-sql by date:

Previous
From: Shekar Tippur
Date:
Subject: Re: Postgres CTE issues
Next
From: "David G. Johnston"
Date:
Subject: Re: Postgres CTE issues