CMDBuild Forum

How to create my own PostgreSQL functions to create charts?

Hi,

I want to create my own chart.

In data source I see only cmf_active_cards_for_class, cmf_count_active_cards.

How do i create my own functions?

I found the above two sample functions in administration manual.

When I grepped for the string "cmf_active_cards_for_class", its present in following files.

/var/lib/tomcat6/webapps/cmdbuild-2.1.7/WEB-INF/patches/2.0.0-04.sql

/var/lib/tomcat6/webapps/cmdbuild-2.1.7/WEB-INF/sql/sample_schemas/demo_schema.sql

/var/lib/tomcat6/webapps/cmdbuild-2.1.7/WEB-INF/sql/base_schema/12_tecnoteca_extras.sql

I created an empty database and added my own cards. So in which of the above file do I add my own function?

Thanks and Regards.

Hi,

 

You don't add the function in any of those files. You add it in the postgress database. use you psql client of choice and write the new function with it. You can use the example in those files or copy it from within postgresql database.