Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZpv7-0007px-BK for pgsql-admin@arkaria.postgresql.org; Mon, 11 Oct 2021 07:40:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mZpv5-0004oN-0U for pgsql-admin@arkaria.postgresql.org; Mon, 11 Oct 2021 07:40:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZpv4-0004oD-KN for pgsql-admin@lists.postgresql.org; Mon, 11 Oct 2021 07:40:22 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZpv1-0008Bf-KO for pgsql-admin@lists.postgresql.org; Mon, 11 Oct 2021 07:40:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Reply-To:Message-ID:Subject:Cc:To:Sender:From:Date: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KGacw64vs4hoSZC0+euSi88YWHtPXXpo+M4HiwF7/aI=; b=Aj7E0QjWF9xRtyJMQj/F/tp5Hm eLneD117hUi7Xejlz9nLoYuHZGnU3OyFXLxnoOwzOejnSjyz7w43e3xxqI47Ow+SCVMc3wndZJfYU wY0grcka9/KzUNNjTENQf7KCvRuqFpExKYuNkVhFkng2AJLT1da7g7UO/CZwnNLKBn1g=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1mZpux-0000CY-Hi; Mon, 11 Oct 2021 09:40:15 +0200 Date: Mon, 11 Oct 2021 09:40:15 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Nelson Gonzaga Cc: "pgsql-admin@lists.postgresql.org" Subject: Re: Hide function source Message-ID: <20211011074015.GA31728@depesz.com> Reply-To: depesz@depesz.com References: <1331401808.1491628.1633855833151.ref@mail.yahoo.com> <1331401808.1491628.1633855833151@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1331401808.1491628.1633855833151@mail.yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Oct 10, 2021 at 08:50:33AM +0000, Nelson Gonzaga wrote: > Dear,How do I hide a function source code from all users except > superuser, but all can execute it?Thanks,NelsonĀ  Write it in something else than sql or plpgsql, and use external file. But, if your function source is security vulnerability, then don't write it that way. Best regards, depesz