pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Casey Allen Shobe <cshobe@bepress.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bill Moran <wmoran@collaborativefusion.com>
Cc: Greg Smith <gsmith@gregsmith.com>
Cc: Jonathan Bond-Caron <jbondc@openmv.com>
Cc: Postgres General List <pgsql-general@postgresql.org>
Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Date: Thu, 25 Sep 2008 13:14:45 -0700
Message-ID: <20080925201445.GD4814@fetter.org> (raw)
In-Reply-To: <C262B817-9165-4EC7-A3E4-D3300A9206DF@bepress.com>
References: <1A6E6D554222284AB25ABE3229A9276201A1993B@nrtexcus702.int.asurion.com>
	<20080915135847.GF3666@fetter.org>
	<7be3f35d0809150731k575bf7aajc689a4278176b1a8@mail.gmail.com>
	<000001c91748$af9288b0$0eb79a10$@com>
	<Pine.GSO.4.64.0809151818430.26261@westnet.com>
	<20080915202922.1778a062.wmoran@collaborativefusion.com>
	<20080916005025.GE3666@fetter.org>
	<20080915221136.f39a284e.wmoran@collaborativefusion.com>
	<16972.1221531560@sss.pgh.pa.us>
	<C262B817-9165-4EC7-A3E4-D3300A9206DF@bepress.com>

On Thu, Sep 25, 2008 at 01:05:26PM -0700, Casey Allen Shobe wrote:
> On Sep 15, 2008, at 7:19 PM, Tom Lane wrote:
>> The problem is that the people who ask for this type of feature are
>> usually imagining that they can put their code on
>> customer-controlled machines and it will be safe from the
>> customer's eyes.
>
> That's a broken expectation.  All that can realistically be expected
> is database/catalog-level constraints.

It's far from clear that those offer protection of any reasonable kind.

>> Well, it isn't, and I don't think Postgres should encourage them to  
>> think it is.
>
> Adding such a feature would NOT be encouraging them to think this - the 
> documentation could be very explicit about this fact.  Maybe that's what 
> Oracle is selling, and that's crappy of them, but that doesn't mean we 
> should use that as justification to not add a more appropriate 
> implementation.

You've got the burden of proof exactly backwards there.  It's on you
or anyone who cares to to explain why it might be a good idea to add
this "feature," understanding that every feature has a maintenance
cost and is a potential source of bugs.

> As for the expectation above - could pl/pgsql be made compilable?
> It  would seem easy to translate pl/pgsql code into C and compile a
> C  function.  That *could* go onto customer-controlled machines and
> be safe from the customer's eyes.

No, it would not.  As many others have mentioned, "strings" does a
pretty good job on such stuff, let alone the impossibility even in
theory of hiding what a program does from someone with access to run
it using arbitrary inputs, even when they have no binary to examine.

> FWIW, I think most people who want to hide code aren't concerned about  
> IP, they're concerned about clients seeing embarrassingly bad/sloppy  
> code.  But there *are* some very real and legitimate needs for this,  
> though it's a small minority of those who think they do.

Please elucidate those needs in detail, then explain why it might be
PostgreSQL's job to meet them.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



view thread (31+ messages)  latest in thread

Message-ID: <20080925201445.GD4814@fetter.org>
Permalink:  ../20080925201445.GD4814@fetter.org/
Also on:    postgresql.org/message-id/20080925201445.GD4814@fetter.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: david@fetter.org, cshobe@bepress.com, tgl@sss.pgh.pa.us, wmoran@collaborativefusion.com, gsmith@gregsmith.com, jbondc@openmv.com
  Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
  In-Reply-To: <20080925201445.GD4814@fetter.org>
  References: <1A6E6D554222284AB25ABE3229A9276201A1993B@nrtexcus702.int.asurion.com> <20080915135847.GF3666@fetter.org> <7be3f35d0809150731k575bf7aajc689a4278176b1a8@mail.gmail.com> <000001c91748$af9288b0$0eb79a10$@com> <Pine.GSO.4.64.0809151818430.26261@westnet.com> <20080915202922.1778a062.wmoran@collaborativefusion.com> <20080916005025.GE3666@fetter.org> <20080915221136.f39a284e.wmoran@collaborativefusion.com> <16972.1221531560@sss.pgh.pa.us> <C262B817-9165-4EC7-A3E4-D3300A9206DF@bepress.com> <20080925201445.GD4814@fetter.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox