Thread

  1. Always one row with group by / agregate

    Alain TESIO <tesio@easynet.fr> — 1999-12-27T06:12:45Z

    dip=> create table t ( x int , y int );
    CREATE
    dip=> select x,min(y) from t group by x;
    x|min
    -+---
     |
    (1 row)
    
    
    select min(y) should return one row with a null value, but it's
    expected. I thought that the first part of the job was to process
    the group by and then the select on each group, but it doesn't
    seem to be the case.
    
    Alain
    
    
    
    
    
  2. Re: [BUGS] Always one row with group by / agregate

    Tom Lane <tgl@sss.pgh.pa.us> — 1999-12-27T15:52:43Z

    "Alain TESIO" <tesio@easynet.fr> writes:
    > dip=> select x,min(y) from t group by x;
    > x|min
    > -+---
    >  |
    > (1 row)
    
    Yup, that's a bug --- with GROUP BY, no rows in should yield no groups
    and hence no rows out.  It's fixed for the next release.
    
    			regards, tom lane