Re: 2 questions about volatile attribute of pg_proc. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 2 questions about volatile attribute of pg_proc.
Date
Msg-id 428542.1618760165@sss.pgh.pa.us
Whole thread Raw
In response to 2 questions about volatile attribute of pg_proc.  (Andy Fan <zhihui.fan1213@gmail.com>)
Responses Re: 2 questions about volatile attribute of pg_proc.  (Isaac Morland <isaac.morland@gmail.com>)
List pgsql-hackers
Andy Fan <zhihui.fan1213@gmail.com> writes:
> We know volatile is very harmful for optimizers and it is the default
> value (and safest value) if the user doesn't provide that.  Asking user
> to set the value is not a good experience,  is it possible to auto-generate
> the value for it rather than use the volatile directly for user defined
> function. I
> think it should be possible, we just need to scan the PlpgSQL_stmt to see
> if there
> is a volatile function?

Are you familiar with the halting problem?  I don't see any meaningful
difference here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bogus collation version recording in recordMultipleDependencies
Next
From: Isaac Morland
Date:
Subject: Re: 2 questions about volatile attribute of pg_proc.