Skip site navigation (1) Skip section navigation (2)

create view foo as select avg(x), avg(y) from bar; "ERROR: attribute 'avg' duplicated" BUG or FEATURE?

From: Javier Kohen <jkohen(at)tough(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: create view foo as select avg(x), avg(y) from bar; "ERROR: attribute 'avg' duplicated" BUG or FEATURE?
Date: 1999-01-14 09:32:18
Message-ID: 19990114063218.A1187@jkohen.tough.com.ar (view raw or flat)
Thread:
Lists: pgsql-bugs
Your name		: Javier Kohen
Your email address	: jkohen(at)tough(dot)com


System Configuration
---------------------
  Architecture (example: Intel Pentium)  	: Intel Pentium MMX

  Operating System (example: Linux 2.0.26 ELF) 	: Linux 2.2.0pre6 ELF

  PostgreSQL version (example: PostgreSQL-6.4)  : PostgreSQL-6.4

  Compiler used (example:  gcc 2.8.0)		: gcc 2.8.1 + glibc 2.0.7pre6


Please enter a FULL description of your problem:
------------------------------------------------
Doing:
create view foo as select avg(x), avg(y) from bar;
causes:
ERROR:  attribute 'avg' duplicated
when
select avg(x), avg(y) from bar;
does not.

The same happens for:
create view foo as select bar.list, baz.list from bar, baz;

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible: 
----------------------------------------------------------------------
Always reproducible.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
Adding support, I guess. I got the two examples from a book and they were supposed to work in Sybase Anywhere SQL 5.0.

PS: for PostgreSQL to compile with my configuration, I had to add manualy the nan.h header somewhere in the sources, IIRC it was postgres.h or something included from (almost) everywhere, just to be sure.

-- 
Javier Kohen <jkohen(at)tough(dot)com>
ICQ #3855350 [The_Crusher]
http://members.xoom.com/jkohen/
http://www.geocities.com/SunsetStrip/Studio/3077/

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 5.0i for non-commercial use

mQGiBDZ1dZoRBADCqJiPpgkJiD5j4nORfxhGecVNTC+LtCxdUlB5/GTQEAgUntRh
94EeqWmQsEIpD4nZB179qO2WQPAU0+zRF4QUG2Nd4z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QS0dt0Scqx4YjXw8JzPS0vOn42HGmf2QEtzoEtWifXV2A7iKrwN76lk236
etyUkVD6zgWKeBXX+zJ+u9Be21AtRvIuIziWGt7xofNgnK1OxtAwCOvyCEfK2WiL
eY+MS33uqw/ZvcxVXyyF/XTvOnGY2IIGi0fdCmhUxD9TE/ugE+QioKdrWJVSzuwV
ADVG3CCvCG2BMoBoUqze9RrWZMvjdQeOnBk0oyvLvsnAK6AZTI2YORUBETXWqFC4
TQKylokAPwMFGDZ1dZxkqmX9scwDqhEC7EwAoPS1eBdGA7Txyk7b4ChuPOODBVYT
AJ4gd5QHMmrcArSkgWL+nYoZUJxJkg==
=p9KG
-----END PGP PUBLIC KEY BLOCK-----

pgsql-bugs by date

Next:From: Unprivileged userDate: 1999-01-14 19:10:27
Subject: General Bug Report: Memory leak in backend on failed inserts
Previous:From: Roland RobertsDate: 1999-01-14 01:52:36
Subject: Postgres 6.3.2 varchar <--> int4 conversions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group