Is there a way to tell postgres that a function will always return the same result for the same parameter, within the same transaction?
Yup… read over the Function Volatility Categories page and decide which you need. What you’re describing is STABLE (or slightly stricter than STABLE, since STABLE makes that guarantee only for a single statement within a transaction).
--
Jason Petersen Software Engineer | Citus Data 303.736.9255
|
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail