pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: David Micallef <david.j.micallef@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: group by true now errors with non-integer constant in GROUP BY
Date: Mon, 28 Aug 2023 17:20:27 -0400
Message-ID: <d5820b3a-4e0d-e8d7-130b-ce82d6509b9f@dunslane.net> (raw)
In-Reply-To: <837886.1693252560@sss.pgh.pa.us>
References: <CAJBCwCS7OuEUmGkrnu5Q8SmBP10njnEiX7vJiaxJURZXcCORyw@mail.gmail.com>
	<CAFBsxsE_zy1Y=u2ZM6xZHFY2Cwfr_Uii=-irsHtCxrh6GnfBNA@mail.gmail.com>
	<837886.1693252560@sss.pgh.pa.us>


On 2023-08-28 Mo 15:56, Tom Lane wrote:
>
> The bigger picture here is: what is the use-case for grouping by a
> constant at all?  Assuming that it is an error seems like a good
> foolproofing restriction.  The reason we felt we could keep the
> "group by N" SQL92-ism after SQL99 redefined GROUP BY arguments is
> exactly that there's no obvious use-case for grouping by a constant.
> As soon as you allow it, "group by N" becomes hopelessly ambiguous.
>
> So my druthers would be to reject this as a non-bug.  But if we accept
> it as something to fix, we need to revisit exactly which conditions
> are errors here.  Perhaps rather than "reject all non-integer cases",
> we should only reject the Float case, and let others fall through to
> the SQL99 code.  (I would not be happy allowing Float, because that'd
> mean that "group by 4" and "group by 4.0" mean fundamentally different
> things.)
>
> 			


I vote for treating it as a non-bug.


cheers


andrew


--
Andrew Dunstan
EDB:https://www.enterprisedb.com

view thread (20+ messages)  latest in thread

Message-ID: <d5820b3a-4e0d-e8d7-130b-ce82d6509b9f@dunslane.net>
Permalink:  ../d5820b3a-4e0d-e8d7-130b-ce82d6509b9f@dunslane.net/
Also on:    postgresql.org/message-id/d5820b3a-4e0d-e8d7-130b-ce82d6509b9f@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, david.j.micallef@gmail.com, peter.eisentraut@enterprisedb.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: group by true now errors with non-integer constant in GROUP BY
  In-Reply-To: <d5820b3a-4e0d-e8d7-130b-ce82d6509b9f@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox