Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Date
Msg-id 199910060553.BAA23414@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison  ("Luuk de Boer" <luuk@wxs.nl>)
Responses Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
List pgsql-hackers
> Thanks bruce and hermit for all the comments,
> I looked into the book "The SQL Standard" fourth edition of Date 
> and in the appendixes page 439 they have an example which they 
> discuss. The example is: select count(*) as x from mt having 0 = 0; 
> with an empty table they say logically correct it should return one 
> column and no rows but sql gives a table of one column and one 
> row. So I think it's true that HAVING has to have an aggregation 
> but it will also be possible use a non-aggregation.
> 
> If I look in our crash-me output page (this is a handy thing for this 
> kind of questions) and look for all the other db's to see what they 
> do I can say the following thing:
> Informix,Access,Adabas,db2,empress,ms-sql,oracle,solid and 
> sybase are all supporting non-aggregation in having clause.
> At this moment everyone except postgres is supporting it.
> 
> The change which I can made is to remove the if structure around 
> the having tests so that having with group functions will also be 
> tested in the crash-me test.
> 
> I will try the patch of bruce for the comment part. It shouldn't be the 
> way that the perl module is stripping the comments of the querie 
> but it is possible and if it is possible it will be a bug in the DBD 
> postgresql perl module.

Maybe we should support the HAVING without aggregates.  What do others
think?


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: "Luuk de Boer"
Date:
Subject: Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Next
From: "Ansley, Michael"
Date:
Subject: RE: [HACKERS] psql Week 1