The davical.sql bundled in www-apps/davical-1.1.1-r1 has to be changed in order to be ran with postgresql >= 9.2. In my case (postgresql-9.3) the required changes were to replace LANGUAGE 'PlPgSQL' IMMUTABLE STRICT; with LANGUAGE 'plpgsql' IMMUTABLE STRICT; These had to be changed in lines 39 and 65. The changes are caused by changes in PostgreSQL>= 9.2 syntax. Reproducible: Always Steps to Reproduce: Run the /usr/share/webapps/davical/1.1.1-r1/sqlscripts/create-database.sh Actual Results: Many error messages. At first line: psql:./davical.sql:39: ERROR: language "PlPgSQL" does not exist Expected Results: Supported locales updated. Updated view: dav_principal.sql applied. CalDAV functions updated. RRULE functions updated. Database permissions updated. (...)
Additonally, the fix for bug #418217 has never reached any portage repository, so you don’t even get that far unless you manually patched the script. So this should be a dependency of this bug and re-opened again until it’s actually in portage.
This is not the only problem by the way: DAViCal seems to be generally incompatible with >=postgresql-9.2. I managed to jump through all the crazy amount of hoops to get it running, just to get this PostgreSQL error when trying to create the first normal user through the admin interface: > ERROR: Function expand_memberships(bigint, integer) does not exist at character 257 [This is manually translated back from German] Apparently there are many more errors like that, which a user described here: http://davical-general.89287.n3.nabble.com/Davical-general-Davical-and-postgresql-9-2-1-td4025474.html Finally, one hoop that’s mentioned nowhere is that /etc/davical/config.php has to have the apache group or be world-readable for the admin interface to work at all. Otherwise you will get the ridiculously useless error message “Could not connect to database” with no explanation why. (Does anyone who reads this have access to the Gentoo Wiki or the DAViCal Wiki entry for Gentoo?)
It IS possible to successfully run davical with postgresql-9.1 though. … provided that bug #481528 is fixed, and that the user keeps access to “trust” in “pg_hba.conf” while running “su postgres -c /usr/share/webapps/davical/1.1.1-r1/sqlscripts/create-database.sh” Just to highlight that.
*davical-1.1.3.1 (14 Nov 2014) 14 Nov 2014; Aaron W. Swenson <titanofold@gentoo.org> +davical-1.1.3.1.ebuild, +files/awl-locations.patch: Version bump fixes bug 523138. New patch fixes bug 481528. Somewhere along the way bug 506558 was fixed. I've got it installed on PostgreSQL 9.4 with no errors.