Re: autonomous transactions

From: Darren Duncan <darren(at)darrenduncan(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autonomous transactions
Date: 2010-09-17 03:28:12
Message-ID: 4C92E04C.6030707@darrenduncan.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Thu, Sep 16, 2010 at 5:19 AM, Dimitri Fontaine <dfontaine(at)hi-media(dot)com> wrote:
>> I think they call that dynamic scope, in advanced programming
>> language. I guess that's calling for a quote of Greenspun's Tenth Rule:
>>
>> Any sufficiently complicated C or Fortran program contains an ad hoc
>> informally-specified bug-ridden slow implementation of half of Common
>> Lisp.
>>
>> So the name of the game could be to find out a way to implement (a
>> limited form of) dynamic scoping in PostgreSQL, in C, then find out all
>> and any backend local variable that needs that to support autonomous
>> transactions, then make it happen… Right?
>
> Interestingly, PostgreSQL was originally written in LISP, and there
> are remnants of that in the code today; for example, our heavy use of
> List nodes. But I don't think that has much to do with this project.
> I plan to reserve judgment on the best way of managing the relevant
> state until such time as someone has gone to the trouble of
> identifying what state that is.

It would probably do Pg some good to try and recapture its functional language
roots where reasonably possible. I believe that, design-wise, functional
languages really are the best way to do object-relational databases, given that
pure functions and immutable data structures are typically the best way to
express anything one would do with them. -- Darren Duncan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2010-09-17 03:51:09 Re: BUG #5650: Postgres service showing as stopped when in fact it is running
Previous Message Darren Duncan 2010-09-17 03:13:10 Re: bad variable subst after "AS"