Thread

  1. ORDER BY on INTERSECT

    PostgreSQL Bugs List <pgsql-bugs@postgresql.org> — 2000-10-14T11:06:29Z

    Petr Splichal (xsplich@fi.muni.cz) reports a bug with a severity of 2
    The lower the number the more severe it is.
    
    Short Description
    ORDER BY on INTERSECT
    
    Long Description
    I was not able to make an ORDER BY on INTERSECT of two SELECTs.
    Instead I got this error:
    
    ] get_sortgroupclause_tle: ORDER/GROUP BY expression not found in
    ] targetlist
    
    pg version:
    PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
    
    have a nice day!
    
    Sample Code
    SELECT id from questions where id < 40 intersect select id from questions where id > 20 order by id;
    ERROR:  get_sortgroupclause_tle: ORDER/GROUP BY expression not found in targetlist
    
    
    No file was uploaded with this report
    
    
    
  2. Re: ORDER BY on INTERSECT

    Tom Lane <tgl@sss.pgh.pa.us> — 2000-10-14T16:42:55Z

    pgsql-bugs@postgresql.org writes:
    > SELECT id from questions where id < 40 intersect select id from questions where id > 20 order by id;
    > ERROR:  get_sortgroupclause_tle: ORDER/GROUP BY expression not found in targetlist
    
    Already fixed in current sources, but thanks for the report.
    
    			regards, tom lane