Re: record new has no field cat - Mailing list pgsql-general

From Tom Lane
Subject Re: record new has no field cat
Date
Msg-id 1936.971810382@sss.pgh.pa.us
Whole thread Raw
In response to record new has no field cat  (Fabrice Pollet <pollet@ensta.fr>)
List pgsql-general
Fabrice Pollet <pollet@ensta.fr> writes:
> ERROR:  INSERT has more expressions than target columns
> I get this message when I insert in table inventaire.

What version are you running?  I don't see a problem with 7.0.2:

play=> insert into inventaire (catgorie) values ('informatique');
ERROR:  empname cannot be NULL value
play=> insert into inventaire (catgorie,dimension,nb_pieds) values ('informatique','z','3');
ERROR:  empname cannot be NULL value
play=> insert into inventaire (catgorie,dimension,nb_pieds,nb_tiroir) values ('informatique','z','3','4');
ERROR:  ExecAppend: rejected due to CHECK constraint $3
play=> insert into inventaire (catgorie,dimension,nb_pieds,nb_tiroir,nie) values ('informatique','z','3','4','q');
INSERT 335042 1
play=>

Possibly more to the point, what is your INSERT command exactly?

            regards, tom lane

pgsql-general by date:

Previous
From: Joseph Shraibman
Date:
Subject: vacuums failing
Next
From: "Martin A. Marques"
Date:
Subject: startup script for Solaris