Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtSuk-00CUiK-4J for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Oct 2023 13:18:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtSuh-001ba2-Ck for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Oct 2023 13:18:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtSuh-001bZu-0O for pgsql-bugs@lists.postgresql.org; Thu, 19 Oct 2023 13:18:11 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qtSua-001GNJ-EP for pgsql-bugs@lists.postgresql.org; Thu, 19 Oct 2023 13:18:10 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9c3aec5f326so167267866b.1 for ; Thu, 19 Oct 2023 06:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697721482; x=1698326282; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=lM6LLz9Y787VcuAmlTdfrT6NENoNXJdisquwaJ3Ma78=; b=lDJRGja2YZauZRtNgt2iAQ/XNwdKw9Bvk31wGFklL3zbGqOHSKghVBqVW23+lGAVhS 3F7GgaLphKb0AZSimi+R0qUwI6JxL+Z1S5mVaVsNmEKADuUB7x/7Rw1ikazLJTYXpK0+ S09gMARVCls6sevdFSsbxuPZslNsVj1ghhZTeyTU9pRAgK6SVvChNh1R0ItxcRvddZ0m GZvoAyO8VOf0117Y8DrP19zEMV1jjKdghFx7mi++WlWXsw8kVk4FRU0q1DvNsds0JQLG j7VefTQnWejuxDDzIlCFdwPOckjFniyQ6qIaEUAS/BbQSPCECOqLdAEhiewGZUtRI+IK SExg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721482; x=1698326282; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lM6LLz9Y787VcuAmlTdfrT6NENoNXJdisquwaJ3Ma78=; b=kI24jkPsaEskuoYhq1tKCCIujRGp8xoNH/XonY/u4IvQ0VeaSobaquFFOUA9INJZmn pcIU5UmOFvjlumtMdue1+zg5aavAMDtIQth0ijfVOCeSnhvzz27yP1GmoBKbGUi4j6ei b/waCBHXYK9i4Tv4JscNfy4niEVKy3nlyBCh8YGAImKCDiH6dWq69OjlE9G29rV1RHyh C88zlHsbf40hmKYHiGlpwxIBRwU/fCXa1FUDwgRT/CBX/jXXYEP2zpEXqybEvvoSCjri cf02nux2t82uXPiLeZk17fNkBIBV4UICQt4LwMi+arN2giQckLZWvnjLicy1Iw1Jnft+ iBBQ== X-Gm-Message-State: AOJu0Yy3CbqRoySJLwnb9ExggL2u6c9nKa5Rpyvugs/uL0CU+Ujm8pRU wYM8LdvGUZ9bgGE9x37j+9UInA== X-Google-Smtp-Source: AGHT+IEmzZjXtEye1eQqV/H4X4CMpwxZ1+wKJ6G0Jl3U/UrQ+XDa9e3ZtYiH/4zlzS//W9GOao2H6w== X-Received: by 2002:a17:907:7e91:b0:9ae:5df2:2291 with SMTP id qb17-20020a1709077e9100b009ae5df22291mr2036457ejc.1.1697721481626; Thu, 19 Oct 2023 06:18:01 -0700 (PDT) Received: from localhost.localdomain ([2001:871:260:ccee:ff5d:296a:ef88:dd9e]) by smtp.gmail.com with ESMTPSA id l26-20020a1709061c5a00b009adcb6c0f0esm3461625ejg.193.2023.10.19.06.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:18:01 -0700 (PDT) Message-ID: <3af446dd6fbfdb6e08de95fc24e06081f78a6f15.camel@cybertec.at> Subject: Re: group by true now errors with non-integer constant in GROUP BY From: Laurenz Albe To: Dennis Brouwer , Tom Lane Cc: John Naylor , David Micallef , Peter Eisentraut , pgsql-bugs@lists.postgresql.org Date: Thu, 19 Oct 2023 15:18:00 +0200 In-Reply-To: References: <837886.1693252560@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2023-10-19 at 14:07 +0200, Dennis Brouwer wrote: > Hibernate is a widely used framework and this library will compose querie= s > (under certain conditions (still unknown to me)) > with GROUP BY coulmn1, column2, true <--=C2=A0 >=20 > Hibernate has been doing this quircky thing for many many years and even > in the latest release does so. So, potentionally many Java Enterprise > applications will be tied to postgresql-14 if there is no compatibility > switch possible.=C2=A0 >=20 > In our case a tiny compatability=C2=A0switch would be a livesaver. Of cou= rcse, > I will try to convince the Hibernate community to have this unnecessary > constant removed but that still leaves all legacy code to not work with > postgresql-15+ databases which would be pitiful! I understand your pain. But according to my reading of the SQL standard, it only allows for regular column references in GROUP BY. Unless I got something wrong, that would mean the the ball is in Hibernate's court. It ought to produce correct SQL. Yours, Laurenz Albe