Re: 2 questions about volatile attribute of pg_proc.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: 2 questions about volatile attribute of pg_proc.
Date: 2021-04-18 15:36:05
Message-ID: 428542.1618760165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andy Fan <zhihui(dot)fan1213(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2021-04-18 15:54:25 Re: 2 questions about volatile attribute of pg_proc.
Previous Message Tom Lane 2021-04-18 15:29:42 Re: Bogus collation version recording in recordMultipleDependencies