Re: Case clause doesn't report syntactic error - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Case clause doesn't report syntactic error
Date
Msg-id CAKFQuwYMz9Ntog_UL-f2+A8YBvNWp3ZbRHYUWx5EkaiWz+ivRw@mail.gmail.com
Whole thread Raw
List pgsql-bugs
On Saturday, September 14, 2024, Leo Volin <lvolin@intelligentaudit.com> wrote:

It doesn't match the documented format: 
CASE WHEN condition THEN result
     [WHEN ...]
     [ELSE result]
END
As long as the type of entry between CASE and first WHEN matches type of WHEN conditions no syntax error is being generated!

Read the entire section documenting case.


There are two forms documented - the general and then the “simple” variant.  You example demonstrates the later.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18617: PostgreSQL Server Subprocess Crashes by the XPATH Function Expression with Crafted Arguments
Next
From: Tom Lane
Date:
Subject: Re: Case clause doesn't report syntactic error