FS#64618 - postgresql 12.1: creation of PL/pgSQL functions fails

Attached to Project: Arch Linux
Opened by Andrius (andrius4669) - Friday, 22 November 2019, 23:53 GMT
Last edited by Levente Polyak (anthraxx) - Saturday, 23 November 2019, 13:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Creating new function with PL/pgSQL language fails with:
ERROR: could not load library "/usr/lib/postgresql/plpgsql.so": /usr/lib/postgresql/plpgsql.so: undefined symbol: pg_printf

Additional info:
* package version(s)
postgresql 12.1-1
postgresql-libs 12.1-1

Steps to reproduce:
$ psql -U postgres
postgres=# CREATE FUNCTION testf1() RETURNS VOID AS $$ $$ LANGUAGE sql;
CREATE FUNCTION
postgres=# CREATE FUNCTION testf2() RETURNS VOID AS $$ BEGIN RETURN NULL; END; $$ LANGUAGE plpgsql;
ERROR: could not load library "/usr/lib/postgresql/plpgsql.so": /usr/lib/postgresql/plpgsql.so: undefined symbol: pg_printf
This task depends upon

Closed by  Levente Polyak (anthraxx)
Saturday, 23 November 2019, 13:32 GMT
Reason for closing:  Not a bug
Comment by Levente Polyak (anthraxx) - Saturday, 23 November 2019, 12:14 GMT
guess you didn't restart postgresql properly, or you have some side modifications. This works flawlessly for me, except that your plpgsql function is invalid as a void function cant return anything.
Comment by Andrius (andrius4669) - Saturday, 23 November 2019, 12:22 GMT
yeah, fault is entirely mine, it was probably still running old binary (11), while trying to load libs from newer.
after proper migration and restart it works properly.

Loading...