Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awOOK-0007OI-KG for pgsql-bugs@arkaria.postgresql.org; Sat, 30 Apr 2016 06:28:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1awOOK-0003sC-5C for pgsql-bugs@arkaria.postgresql.org; Sat, 30 Apr 2016 06:28:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1awONh-0003BA-L2 for pgsql-bugs@postgresql.org; Sat, 30 Apr 2016 06:27:57 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awONe-0007Se-VX for pgsql-bugs@postgresql.org; Sat, 30 Apr 2016 06:27:56 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id u3U6Rm829787 for ; Fri, 29 Apr 2016 23:27:48 -0700 Subject: Re: BUG #14103: stored function encryption To: pgsql-bugs@postgresql.org References: <20160420105947.22934.66599@wrigleys.postgresql.org> <57178A1D.8010309@hogranch.com> <20160430020130.GB28568@momjian.us> From: John R Pierce Message-ID: <409f9f72-6e17-55e2-2de0-53ca6b069e8f@hogranch.com> Date: Fri, 29 Apr 2016 23:27:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20160430020130.GB28568@momjian.us> Content-Type: multipart/alternative; boundary="------------4DC818FD796DD60703A6ED0C" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------4DC818FD796DD60703A6ED0C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 4/29/2016 7:01 PM, Bruce Momjian wrote: >>> how to encrypt functions in Postgresql so that we can hide all my business >>> > >logic ? >> > >> >write them in C or another compiled language, supply them as .SO (or .dll) >> >files. > FYI, you can often run 'strings' on the object file to see the SQL > queries. hah, true, so I guess if you really want to hide it, you've got to hash all your string constants, or use an obtuse sql generator. -- john r pierce, recycling bits in santa cruz --------------4DC818FD796DD60703A6ED0C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 4/29/2016 7:01 PM, Bruce Momjian wrote:
how to encrypt functions in Postgresql so that we can hide all my business
> >logic ?
> 
> write them in C or another compiled language, supply them as .SO (or .dll)
> files.
FYI, you can often run 'strings' on the object file to see the SQL
queries.

hah, true, so I guess if you really want to hide it, you've got to hash all your string constants, or use an obtuse sql generator.



-- 
john r pierce, recycling bits in santa cruz
--------------4DC818FD796DD60703A6ED0C--