Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #29943 All Revisions ] Back to Issue ]
Summary 0029943: support to define DB functions volatility
Revision 2019-04-02 09:46 by alostale
Description Right now the db functions created by the dbsm have the annotation VOLATILE.

It would be great to support also the STABLE keyword, which returns always the same result when the same parameters are passed.

Definition from http://www.postgresql.org/docs/9.1/static/sql-createfunction.html [^] :
"STABLE indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. This is the appropriate selection for functions whose results depend on database lookups, parameter variables (such as the current time zone), etc. (It is inappropriate for AFTER triggers that wish to query rows modified by the current command.) Also note that the current_timestamp family of functions qualify as stable, since their values do not change within a transaction."


This flag could be used in some common functions to drastically increase the performance of processes where these functions are involved. Example of candidate functions: ad_isorgincluded, ad_org_isinnaturaltree, etc.

See project: http://wiki.openbravo.com/wiki/Projects:Configurable_DB_Functions_Volatility [^]
Revision 2015-05-20 13:36 by vmromanos
Description Right now the db functions created by the dbsm have the annotation VOLATILE.

It would be great to support also the STABLE keyword, which returns always the same result when the same parameters are passed.

Definition from http://www.postgresql.org/docs/9.1/static/sql-createfunction.html [^] :
"STABLE indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. This is the appropriate selection for functions whose results depend on database lookups, parameter variables (such as the current time zone), etc. (It is inappropriate for AFTER triggers that wish to query rows modified by the current command.) Also note that the current_timestamp family of functions qualify as stable, since their values do not change within a transaction."


This flag could be used in some common functions to drastically increase the performance of processes where these functions are involved. Example of candidate functions: ad_isorgincluded, ad_org_isinnaturaltree, etc.
Revision 2015-05-20 13:28 by vmromanos
Description Right now the db functions created by the dbsm have the annotation VOLATILE.

It would be great to support also the STABLE keyword, which returns always the same result when the same parameters are passed.

Definition from http://www.postgresql.org/docs/9.1/static/sql-createfunction.html [^] :
"STABLE indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. This is the appropriate selection for functions whose results depend on database lookups, parameter variables (such as the current time zone), etc. (It is inappropriate for AFTER triggers that wish to query rows modified by the current command.) Also note that the current_timestamp family of functions qualify as stable, since their values do not change within a transaction."


This flag could be used in some common functions to drastically increase the performance, for example ad_isorgincluded, ad_org_isinnaturaltree, etc.


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker