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

Wishlist for next version: group by clause

From: Edmund Mergl <E(dot)Mergl(at)bawue(dot)de>
To: PostgreSQL Developers Mailinglist <pgsql-hackers(at)postgresql(dot)org>
Subject: Wishlist for next version: group by clause
Date: 1998-06-13 18:07:42
Message-ID: 3582BFEE.A0EE9C05@bawue.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

currently I'm writing a Web application, which should 
be able to interface to any SQL database. Using perl this
seems to be straigt forward, mainly due to the DBI module
of Tim Bunce. What makes this task really difficult are
the SQL-dialects of every database. Although SQL is
standardized, there are many, subtle differences which have
to be taken into account. After stripping down my application
to an absolut basic syntax, there is still one problem left.

PostgreSQL understands the following syntax:

  select count(SUBSTR(var,1,5)),      SUBSTR(var,1,5)      from t group by 2;
  select count(SUBSTR(var,1,5)) as x, SUBSTR(var,1,5) as y from t group by y;

Unfortunately other databases - like Oracle - are not able to
handle these statements. Oracle understands only the following syntax:

  select count(SUBSTR(var,1,5)), SUBSTR(var,1,5) from t group by SUBSTR(var,1,5);

which gives an error with PostgreSQL !


I don't know if any of these variants are standard or non-standard,
but it would be very helpful, if PostgreSQL would be able to
handle all of these examples. From the functional point of view,
there is no difference. I guess, only the parser has to be adapted.


Edmund
-- 
Edmund Mergl          mailto:E(dot)Mergl(at)bawue(dot)de
Im Haldenhau 9        http://www.bawue.de/~mergl
70565 Stuttgart       fon: +49 711 747503
Germany

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-06-13 20:18:36
Subject: Re: [BUGS] NOTICE:AbortTransaction and not in in-progress state
Previous:From: Peter T MountDate: 1998-06-13 11:31:33
Subject: Re: [HACKERS] [QUESTIONS] builtin lo_unlink(int4)? why int4 not oid?

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