Re: Add PL/pgSQL extra check no_data_found - Mailing list pgsql-hackers

From Sergey Shinderuk
Subject Re: Add PL/pgSQL extra check no_data_found
Date
Msg-id 47a99e2d-879d-0ecc-578e-e23527c5af51@postgrespro.ru
Whole thread Raw
In response to Re: Add PL/pgSQL extra check no_data_found  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 09.12.2022 09:46, Pavel Stehule wrote:
> I don't like the idea about possible replacement of INTO STRICT by INTO 
> + extra warnings.
> 
> Handling exceptions is significantly more expensive than in Oracle, and 
> using INTO without STRICT with the next test IF NOT FOUND THEN can save 
> one safepoint and one handling an exception. It should be mentioned in 
> the documentation. Using this very common Oracle's pattern can have a 
> very negative impact on performance in Postgres. If somebody does port 
> from Oracle, and wants compatible behavior then he should use INTO 
> STRICT. I think it is counterproductive to hide syntax differences when 
> there is a significant difference in performance (and will be).

Fair enough. Thank you, Pavel.

-- 
Sergey Shinderuk        https://postgrespro.com/




pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning
Next
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum