Skip site navigation (1) Skip section navigation (2)

Re: leakproof

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: leakproof
Date: 2012-02-27 00:34:39
Message-ID: CA+TgmoZvCmObG4D6bxj7rO7qLMvcgkmdQ3BUiyF=2+CLaxH-NA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, Feb 26, 2012 at 6:44 PM, A.M. <agentm(at)themactionfaction(dot)com> wrote:
> If you are willing to go full length, then the computer science term is "referential transparency", no?
>
> http://en.wikipedia.org/wiki/Referential_transparency_(computer_science)
>
> So a function could be described as "REFERENTIALLY TRANSPARENT".

Hmm, I think that's very close to what we're looking for.  It might be
slightly stronger, in that it could conceivably be OK for a leakproof
function to read, but not modify, global variables... but I can't
think of any particular reason why we'd want to allow that case.
OTOH, it seems to imply that referential transparency is a property of
expressions built from pure functions, and since what we're labeling
here are functions, that brings us right back to PURE.

I'm thinking we should go with PURE.  I still can't think of any real
use case for pushing down anything other than an immutable function,
and I think that immutable + no-side-effects = pure.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-02-27 01:23:16
Subject: Re: leakproof
Previous:From: Robert HaasDate: 2012-02-27 00:10:03
Subject: Re: Misleading CREATE TABLE error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group