Re: Proposal: is_castable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Adam Brusselback <adambrusselback(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michał Wadas <michalwadas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: is_castable
Date: 2020-04-04 04:38:57
Message-ID: CAFj8pRBHig4HD4dVhH1PffixX4pcaL2E5jvfqs022cNABKLt6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

> So it's a two step process for me currently because of this, I would love
> if there was a better way to handle
> this type of work though, because my plpgsql functions using exception
> blocks are not exactly great
> for performance.
>

Probably we can for some important buildin types write method "is_valid",
and this method can be called directly. For custom types or for types
without this method, the solution based on exceptions can be used.

This should not be too much code, and can be fast for often used types.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2020-04-04 05:01:36 Re: backup manifests and contemporaneous buildfarm failures
Previous Message Pavel Stehule 2020-04-04 04:31:17 Re: proposal \gcsv