Odd error message: insert into...select from ... - Mailing list pgsql-hackers

From The Hermit Hacker
Subject Odd error message: insert into...select from ...
Date
Msg-id Pine.BSF.4.05.9902160211120.10449-100000@thelab.hub.org
Whole thread Raw
List pgsql-hackers
This is in v6.4 ...

surveys=> create table systems (
surveys-> operating_system text,
surveys-> count int4 );
CREATE
surveys=> insert into systems 
surveys-> select sys_type,count(sys_type)
surveys-> from op_sys
surveys-> where sys_type is not null
surveys-> group by sys_type;
ERROR:  insert: more expressions than target columns
surveys=> \d systems

Table    = systems
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| operating_system                 | text                             |   var |
| count                            | int4                             |     4 |
+----------------------------------+----------------------------------+-------+


Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



pgsql-hackers by date:

Previous
From: "Ken Mort"
Date:
Subject: 8K block limit
Next
From: The Hermit Hacker
Date:
Subject: Might already be fixed...?