Wildcards in GROUP BY?

From: Jon Lapham <lapham(at)extracta(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Wildcards in GROUP BY?
Date: 2002-06-27 19:31:14
Message-ID: 3D1B6802.1050507@extracta.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello-

Is it possible to use wild cards in a GROUP BY statement?

ie: running the following query

SELECT a.*, COUNT(b.something)
FROM a, b
WHERE a.id=b.id
GROUP BY a.*;

returns the following message:
ERROR: parser: parse error at or near "*"

If you cannot use wildcards in GROUP BY statements, is the only solution
to expand "a.*" to all its constituent parts? Ugh.

main_v0_8=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

Thanks, Jon

--

-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham
Extracta Moléculas Naturais, Rio de Janeiro, Brasil
email: lapham(at)extracta(dot)com(dot)br web: http://www.extracta.com.br/
***-*--*----*-------*------------*--------------------*---------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glen Parker 2002-06-27 20:44:56 Re: Shared Memory Sizing
Previous Message Christopher Murtagh 2002-06-27 19:20:43 Permissions question