Taking .sql out of the list of ignored file extensions. Otherwise create/upgrade sql scripts are not loaded while installing/upgrading.
Creating recursive version of permissions functions iff pg version is >= 8.4.
apm_get_package_files has new boolean switch -include_data_model_files in order to allow including/excluding sql files when looking for files within a package.
When fetching files for a given package we also want to retrieve sql files.
apm_include_file_p wont ignore anymore the upgrade directory in case data_model_files flag is set.