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 1ueA6J-005nHw-OJ for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 10:20:00 +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 1ueA6I-006Obj-Tb for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 10:19:59 +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 1ueA6I-006ObU-Fo for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 10:19:58 +0000 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ueA6G-000BXm-2t for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 10:19:57 +0000 Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-87f32826f22so6539769241.0 for ; Tue, 22 Jul 2025 03:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753179596; x=1753784396; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=oDMdjp0kXlOozeUhGglmNeidE0pFUu/SqkU5cP5gF2I=; b=IEaDvl4yS9uqvjsOcEnPykxCKkgh3kk/8JalGWJV5xXjAlEChm8+kiKeOGwWnMR8/n x5WXr1oONutYNXu3VLeleBXQIqNbM0l5DxgwbQFiA4DPXunV/dcMXrrkp5yoqd1KSFBd Ff6TtZ8Dg7EGHfw/GiwYHZwdVU9C+gIGlRS2PVAGAHOKuP9g9BXosWXBcM8xR7sPirph Bzz5bpUAmaAENBYjlolmfqMoI0oRIYQGhMWcpahUMUnMlWqk3Jk8nlOt4nez6XqN0EPi vgirm6OR395dh51VXs2EdhXpiN3SqWIK7A6r2QV8wOhPhRJ3dX8DqLbyM635Nh0cFMna 37Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753179596; x=1753784396; h=content-transfer-encoding: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=oDMdjp0kXlOozeUhGglmNeidE0pFUu/SqkU5cP5gF2I=; b=reRPXiQQT9Hbw41V623gU27KzdixAo+zV49bunTlaKtFqdshR4QALRnauOFjEesDs/ R3sTuzz7w5bjp26owCKQ9Miw/gY262zCAgEXJxmTxfF650oR1F5Ev44m6Ag9ziHi+Vnc WPt+92KTh2ntQBCzHvofiALO/7P+thSHSqNKwaXD0u11oeswIyW23T81h0mJuiB7+xB1 0uQ7zrAarqXw2WfuzKQmRxr/suHF1VYmiS5KvRUc2YArjuHdzkTUsU4KyNBjGJSNGTmj WFgvRHoKrJPX0TZBYeTtZZQbzXgmNKJzaAovKhXO3qUrlHnqwgscgPUbjaEC300NlSNb rgXA== X-Forwarded-Encrypted: i=1; AJvYcCVugXyYKVeRGrpqdaajVxopVOitLQ5rWyCWn2OQgjJkq/xr3mQi8dnp/3lEal8N5Z0lHjmhqO/TmZTPEXMU@lists.postgresql.org X-Gm-Message-State: AOJu0YxxebxPuTEv6XT/o5Qo0VOZtN9wx1EatO5zMecmOEMrzttDAO9/ sxzT81ht7AB7hnC+Q8OjpmLqEvnGBUWpXwWy8a3fNg0Ik+6lMY+WBPABxTve3t5JuXh4e5nZZSZ 0av3902sCDosX3id+kBrVIMBOushTdzE= X-Gm-Gg: ASbGncsnRqDi5xTPD7r8d/Om9jLh+w+E/w1T+eHdRVucwZRdkuZKvoAqd4Te+Vl5lli a7ABK27whJTkX6skBVNERCCR6AvYY8CqworjOGB9SCxnPWh9FAavJdB5QgGFyUcDprEmax9lNPg EUukAU58zOV0xAwr92ZaDU6FKtEo9zbTprmgUhXrZmUUK1Rt/s+5i6PRXNX17LMueSXIufcVx94 rjenZj6miHPQDHmiRA72dCL/EZSjFx9DASfXhE= X-Google-Smtp-Source: AGHT+IGf/M7h1IixBgfnEbDMoKqhUzji8BUTPcT874FllBL8pBo8BLdeIjUcJBh2F7/jAxtsBHnfE/8zIIxj8Pr/7oc= X-Received: by 2002:a05:6102:6cd:b0:4e7:b77d:7fe1 with SMTP id ada2fe7eead31-4f9f9d7bdeamr1435942137.0.1753179595801; Tue, 22 Jul 2025 03:19:55 -0700 (PDT) MIME-Version: 1.0 References: <04afcd1f-ed7d-4c0a-add1-50e3719ccbf9@postgresfriends.org> In-Reply-To: <04afcd1f-ed7d-4c0a-add1-50e3719ccbf9@postgresfriends.org> From: jian he Date: Tue, 22 Jul 2025 18:19:18 +0800 X-Gm-Features: Ac12FXySed409wnj_4mT1rNdpaiTrqdOJiv85r35gKOeUvD5ffsvNzS_ANGTil0 Message-ID: Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions To: Vik Fearing Cc: Corey Huinker , Isaac Morland , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 22, 2025 at 2:45=E2=80=AFPM Vik Fearing wrote: > > It was accepted into the standard after 2023 was released. I am the > author of this change in the standard, so feel free to ask me anything > you're unsure about. > is the generally syntax as mentioned in this thread: CAST(source_expression AS target_type DEFAULT default_expression ON ERROR) if so, what's the restriction of default_expression?