parser oddity (t.count)

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: pghackers <pgsql-hackers(at)postgresql(dot)org>
Subject: parser oddity (t.count)
Date: 2000-05-25 15:40:19
Message-ID: 392D4963.74C9E642@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's what I thought to be an odd result from the 7.0beta3 parser...

create table foo (id serial, h_count integer);
insert into foo (h_count) values (10);
create table temp_foo as select * from foo;
drop table foo;
drop sequence foo_id_seq;
create table foo (id serial, h_count integer);
insert into foo (id, h_count) select t.id, t.count from temp_foo t;

ERROR: Attribute t.id must be GROUPed or used in an aggregate function

I mislabeled the 't.h_count' column in my INSERT statement as 't.count',
and what I found strange was that the parser evidently thinks t.count is
an aggregate. Is 't.count' valid use/syntax for an aggregate?

Regards,
Ed Loehr

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-05-25 15:42:50 AW: Berkeley DB...
Previous Message Ed Loehr 2000-05-25 15:35:13 Timezone discrepancies