Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iYIj0-000713-Il for pgsql-general@arkaria.postgresql.org; Fri, 22 Nov 2019 23:52:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iYIiy-0003Jt-3d for pgsql-general@arkaria.postgresql.org; Fri, 22 Nov 2019 23:52:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iYIix-0003Jl-Q9 for pgsql-general@lists.postgresql.org; Fri, 22 Nov 2019 23:52:27 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iYIip-0003VH-3h for pgsql-general@lists.postgresql.org; Fri, 22 Nov 2019 23:52:25 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 47KYBT20wjz1kCW for ; Fri, 22 Nov 2019 18:52:17 -0500 (EST) Received: by panix2.panix.com (Postfix, from userid 17622) id 47KYBT0X5pz1ZVv; Fri, 22 Nov 2019 18:52:17 -0500 (EST) Date: Fri, 22 Nov 2019 18:52:16 -0500 From: stan To: pgsql-general@lists.postgresql.org Subject: And I thought I had this solved. Message-ID: <20191122235216.GA7008@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk A while back I ran into problems caused by security fix related to the search path. I wound up adding a line to. for instance, this function: REATE FUNCTION work_hours ( start_date date, end_date date ) RETURNS decimal(10,4) stable language sql as $$ /* workaround for secuirty "feature" */ SET search_path TO ica, "user" , public; SELECT sum(case when extract(isodow from d) between 1 and 5 then 8.0 else +0.0 end) from generate_series($1, $2, interval '24 hours') d; $$; And walked away happy, or so I thought. Now I just got this error: [local] stan@stan=# select * from ttl_avail_hours_by_project_and_employee ; ERROR: SET is not allowed in a non-volatile function CONTEXT: SQL function "work_hours" during startup How can I solve this issue? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin