I've written triggers and other functions for Postgres which work fine on my development PC, but when I deploy them on the Webfaction server I get an
It seems to see plpgsql's In initially thought I'd found the problem in the documentation at https://docs.webfaction.com/user-guide/databases.html#enabling-procedural-languages-for-postgresql which said plpgsql is not installed by default. But entering
Any suggestions on how to get my pgsql scripts to run? Robert asked 18 Apr '18, 15:22 roblaing |
You would need to use a private database or ask us in a support ticket to import the sql. Triggers require super user access to enable. answered 18 Apr '18, 21:43 johns Many thanks for the prompt reply. I've found the documentation on installing a private database and will proceed with that.
(19 Apr '18, 06:06)
roblaing
|
I sorted the problem by not using triggers (which in postgresql are functions without parameters and so have to use the NEW.columname, OLD.columname syntax which may have only been introduced after version 9.4). By using "normal" plpgsql functions, passing the parameters to the function instead of using NEW.foo, OLD.foo etc, instead of triggers, the script works fine without using a private database instance. answered 21 Apr '18, 07:57 roblaing |