public inbox for [email protected]
help / color / mirror / Atom feedFrom: Vik Fearing <[email protected]>
To: jian he <[email protected]>
Cc: Corey Huinker <[email protected]>
Cc: Isaac Morland <[email protected]>
Cc: [email protected]
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Date: Tue, 22 Jul 2025 14:45:42 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CADkLM=fv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ@mail.gmail.com>
<CAMsGm5dpfm2PHL8XZvC-JSd+UPkgx3rpReUA=G=4+rUCH+Ntcw@mail.gmail.com>
<CADkLM=eD_S8mGhPfu5+hXXvXgR0-cxGpGd9dgPzD+nCuO7HFaQ@mail.gmail.com>
<CACJufxHCMzrHOW=wRe8L30rMhB3sjwAv1LE928Fa7sxMu1Tx-g@mail.gmail.com>
<[email protected]>
<CACJufxGRAnwJzu7nMq4ZP=yqa1Sz=qR+mR1TmY0aCDjJoJRRtg@mail.gmail.com>
<[email protected]>
On 22/07/2025 14:26, Vik Fearing wrote:
> The <cast error behavior> is:
>
> <cast error behavior> ::=
> ERROR
> | NULL
> | DEFAULT <value expression>
>
> but I am planning on removing the NULL variant in favor of having the
> <value expression> be a <contextually typed value specification>. So
> it would be either ERROR ON CONVERSION ERROR (postgres's current
> behavior), or DEFAULT NULL ON CONVERSION ERROR.
Sorry, I meant <implicitly typed value specification>.
The point being that CAST(ARRAY['1', '2', 'three'] AS INTEGER ARRAY
DEFAULT NULL ON CONVERSION ERROR) will give you (CAST NULL AS INTEGER
ARRAY) and *not* ARRAY[1, 2, NULL].
--
Vik Fearing
view thread (75+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox