Re: Better performance no-throw conversion?

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Better performance no-throw conversion?
Дата
Msg-id CAHOFxGo1NgadCj19irBQJfb_0D5MidMTvVkp6TfX6JWxHEzhRA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Better performance no-throw conversion?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы RE: Better performance no-throw conversion?  ("ldh@laurent-hasson.com" <ldh@laurent-hasson.com>)
Список pgsql-performance
On Wed, Sep 8, 2021 at 11:33 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"ldh@laurent-hasson.com" <ldh@laurent-hasson.com> writes:
> Some databases such as SQLServer (try_cast) or BigQuery (safe.cast) offer not-throw conversion.
> ...
> I couldn't find a reference to such capabilities in Postgres and wondered if I missed it, and if not, is there any plan to add such a feature?

There is not anybody working on that AFAIK.  It seems like it'd have
to be done on a case-by-case basis, which makes it awfully tedious.

Do you just mean a separate function for each data type? I use similar functions (without a default value though) to ensure that values extracted from jsonb keys can be used as needed. Sanitizing the data on input is a long term goal, but not possible immediately.

Is there any documentation on the impact of many many exception blocks? That is, if such a cast function is used on a dataset of 1 million rows, what overhead does that exception incur? Is it only when there is an exception or is it on every row?

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Better performance no-throw conversion?
Следующее
От: "ldh@laurent-hasson.com"
Дата:
Сообщение: RE: Better performance no-throw conversion?