From 64eed40c3fb883072073a2f52c50db888fc1dedb Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Wed, 21 Oct 2020 20:22:18 +0300 Subject: [PATCH] [bug] For bug 45406. Fix bug for PostgreSQL before 9.5 --- schema/postgresql/createdb.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/schema/postgresql/createdb.sql b/schema/postgresql/createdb.sql index 7433b518..96b553a8 100644 --- a/schema/postgresql/createdb.sql +++ b/schema/postgresql/createdb.sql @@ -43,7 +43,11 @@ BEGIN LOOP -- first try to update the key -- note that "a" must be unique - UPDATE "public"."task_result" SET last_open_date=_last_open_date, user_index=user_index+1 WHERE id = _id RETURNING user_index into userindex; + IF ((_callback <> '') IS TRUE) AND ((_baseurl <> '') IS TRUE) THEN + UPDATE "public"."task_result" SET last_open_date=_last_open_date, user_index=user_index+1,callback=_callback,baseurl=_baseurl WHERE id = _id RETURNING user_index into userindex; + ELSE + UPDATE "public"."task_result" SET last_open_date=_last_open_date, user_index=user_index+1 WHERE id = _id RETURNING user_index into userindex; + END IF; IF found THEN isupdate := 'true'; RETURN;