Re: Query regarding functions of postgres

2024-04-07 Thread Tom Lane
Ayush Vatsa writes: > Recently I was reading about functions Immutability and security definer > but got confused > Whether the below two functions can be marked immutable or not > 1. If a function has constant Raise notice inside it. Eg. > CREATE OR REPLACE FUNCTION text_equals(text, text) RETUR

Re: Query regarding functions of postgres

2024-04-07 Thread David G. Johnston
On Sunday, April 7, 2024, Ayush Vatsa wrote: > > Whether the below two functions can be marked immutable or not > 1. If a function has constant Raise notice inside it. Eg. > Seems legit. > > 2. If a function has Raise notice but extracting current user inside notice, > although its output pur

Query regarding functions of postgres

2024-04-07 Thread Ayush Vatsa
Hi PostgreSQL Community, Recently I was reading about functions Immutability and security definer but got confused Whether the below two functions can be marked immutable or not 1. If a function has constant Raise notice inside it. Eg. CREATE OR REPLACE FUNCTION text_equals(text, text) RETURNS boo