Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506558 - www-apps/davical-1.1.1-r1 with >=dev-db/postgresql-base-9.2 - psql:./davical.sql:39: ERROR: language "PlPgSQL" does not exist
Summary: www-apps/davical-1.1.1-r1 with >=dev-db/postgresql-base-9.2 - psql:./davical....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-02 14:08 UTC by marcc
Modified: 2014-11-14 19:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marcc 2014-04-02 14:08:51 UTC
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.
(...)
Comment 1 Navid Zamani 2014-07-22 22:16:00 UTC
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.
Comment 2 Navid Zamani 2014-07-23 00:21:07 UTC
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?)
Comment 3 Navid Zamani 2014-07-23 04:04:28 UTC
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.
Comment 4 Aaron W. Swenson gentoo-dev 2014-11-14 19:31:26 UTC
*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.