Odd error message: insert into...select from ...

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Odd error message: insert into...select from ...
Date: 1999-02-16 06:11:54
Message-ID: Pine.BSF.4.05.9902160211120.10449-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-02-16 06:14:30 Might already be fixed...?
Previous Message Ken Mort 1999-02-16 04:25:19 8K block limit