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 1tkAiJ-000sOH-JY for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2025 23:39:47 +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 1tkAiI-004pYP-8y for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2025 23:39:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tkAiH-004pXv-W3 for pgsql-bugs@lists.postgresql.org; Mon, 17 Feb 2025 23:39:46 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tkAiF-001Rqe-2m for pgsql-bugs@lists.postgresql.org; Mon, 17 Feb 2025 23:39:45 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-8559461c2c2so34804839f.0 for ; Mon, 17 Feb 2025 15:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739835582; x=1740440382; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=coT4UNJTFloZiC5gqwmOQiclv6EnpoKUlCFkaN1aGUI=; b=dfPn+H1cf4rG2yaKY7Me4HUNyZ94R2yV7EkvTd/Z3DHBjxUqN/GtS6Y+WEIldhpcVL VbDYzGhQhHqHO9/a4P5fERgaTyii9RdTql/VNoNxxzb3Ly4Wnl3BxUbJ5GWnbusajmAs BTu2Kz9DoZqdPi1QM9+7UiAFqjR0hmIt7zVmvqEWNwFs3y+F5ANdIXbPtzzXrURlzTMr wh7vK8vMhNN6UjaSau5ZjiNQEREy5zCkzyEQrjyQx9xjtkh2PR8MiogmGbGIaUIp6ACG ooZ/86Xab2vDlMwv7wVfhADgFS3YuKidX7G35CRT4d3I7TqmAwscZnNbC1e2PBvo4eEl CZRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739835582; x=1740440382; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=coT4UNJTFloZiC5gqwmOQiclv6EnpoKUlCFkaN1aGUI=; b=NTwX8HLWGKz6Rf8xozRWgVqcgWp7pozHTM9ASb5FqSgJCahI8q2jaob3uzEnFuFIGK JLtHwBZ73jIpEuj9R/KY8onbDASCdv6zRuINw10fh5KGslGU3tzxkpTY3HmtQr1hZD+b R6tlCCboN2RS0aymrZLNQenvtFdENK+Pglg04gBQYELrmWXe8eUVLh7dTalGpJnPrChk rZ/SQviZaJqxFisj8ROALlLkRo7Pbga07iSv3eJ8rqzNkx99iSx8csBRxqV0Yz5eewmK COdo+kzWvKENRlnKEaGDcoSM7/qOZDOWif33Np/6RFS5k0ofdYwx1iqGHZptJ74Nfp6J GxZw== X-Gm-Message-State: AOJu0Yz9viHzJ+VSK8M92dU8UqopQwoN91CbZAyqD6n4ICnWuspFgjEE AT6nlTs31CpIBEGtxZix84XCX2Z+QWc1D7ivYBswMC8Yhp0aak+MJAZ0lb4M6Cs/5T2kUHo2kRD /tBe+ZnCTZZmGfTIt4BoKU/GMgrfP6D/y X-Gm-Gg: ASbGncuamDlQXpAqCCxwL2xlA2Gdq8vO2QmRZdPp1SaifbqBHZF4oNQdEHQ8DpWSz3s LgfDCRvf3bOOTFFqGjm67A+Ae3o0OcqEINoKJu5L4hKlZfGGCVF0W9H+g50YbVv4yOH4WN81J X-Google-Smtp-Source: AGHT+IH3TYhGpJTi1wpambbKM8RxXt+5MGOKG4H49saB09e8toxqkhdXh/36pI9mO7hQ7qycTZ7KC0NMjn1IkYtRkK0= X-Received: by 2002:a05:6e02:4714:b0:3d2:aa73:7b7a with SMTP id e9e14a558f8ab-3d2aa737ebfmr8430465ab.12.1739835582073; Mon, 17 Feb 2025 15:39:42 -0800 (PST) MIME-Version: 1.0 References: <18594-af265c6988d431d8@postgresql.org> <0838f16a-8b3d-4c39-9ad8-5d27791e9dec@dunslane.net> <3501446.1724890288@sss.pgh.pa.us> In-Reply-To: From: Chris BSomething Date: Tue, 18 Feb 2025 07:39:31 +0800 X-Gm-Features: AWEUYZkrcXoVo0atH7Wyvhff_hJxNL_nmzS-ekrBZ3CfaL6qcLWVb66y88YMBjQ Message-ID: Subject: Re: BUG #18594: CASE WHEN ELSE failing to return the expected output when the same colum is used in WHEN and ELSE To: "David G. Johnston" Cc: PostgreSQL Bug List Content-Type: multipart/alternative; boundary="000000000000d654f2062e5f095c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d654f2062e5f095c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 18, 2025, 7:13=E2=80=AFAM David G. Johnston wrote: > On Mon, Feb 17, 2025 at 3:49=E2=80=AFPM Chris BSomething > wrote: > >> That sounds like a lot of words to justify an error that could be caught >> at parse time, that is actually never caught at all. It seems to me tha= t >> whatever type is inferred from a long constant string, it won't fit into= a >> char... At least not without casting it. And therefore an error should c= ome >> out. >> > > I thought you were trying to convince people to modify the documentation? > This reads more like wanting to hack the parser to teach it forbidden > knowledge. > Hack? Forbidden knowledge? What an odd comment. > > --000000000000d654f2062e5f095c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Feb 18, 2025, 7:= 13=E2=80=AFAM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Mon, Feb 17, 2025 at 3:49=E2=80=AFPM Chri= s BSomething <xpusostomos@gmail.com> wrote:
=
That sounds like a lot of words to justify an erro= r that could be caught at parse time, that is actually never caught at all.= =C2=A0 It seems to me that whatever type is inferred from a long constant s= tring, it won't fit into a char... At least not without casting it. And= therefore an error should come out.

I thought you were trying to convince people to modify the documentatio= n?=C2=A0 This reads more like wanting to hack the parser to teach it forbid= den knowledge.

Hack? Forbidden knowledge? What an odd comme= nt.




--000000000000d654f2062e5f095c--