Re: Including Snapshot Info with Indexes

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>, "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Including Snapshot Info with Indexes
Date: 2007-10-09 15:36:19
Message-ID: 1191944179.16320.60.camel@PCD12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2007-10-09 at 11:22 -0400, Andrew Dunstan wrote:
>
> Csaba Nagy wrote:
> > You mean postgres should check your function if it is really immutable ?
> > I can't imagine any way to do it correctly in reasonable time :-)

> I would say that in the general case it's analogous to the halting
> problem, not solvable at all let alone in any reasonable time.

In the light of Florian's mail, I would say that in the context of a
language which can check each of it's constructs if it is immutable or
not, a procedure using only immutable constructs should be itself
immutable... the halting problem is avoided in that you don't really
need to know if/how the procedure works, you only need to know that it
will always work the same ;-) The problem is that in the general case
the languages don't have available checks for this kind of thing, so
either you restrict the immutability check to simple languages ("static
enough" as Florian would say) or you must allow the user to decide if
the function is immutable or not. In the general case I assume the users
will want the power to decide (and potentially be wrong), and will
expect that if they do mistake, the result won't be catastrophic. I
guess this is the same conclusion as in previous threads about the
subject...

Cheers,
Csaba.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-10-09 15:37:33 Re: Timezone database changes
Previous Message Andrew Dunstan 2007-10-09 15:32:19 Re: Including Snapshot Info with Indexes

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-10-09 15:41:56 Re: Preliminary patch for tsearch example dictionaries/parsers in contrib
Previous Message Andrew Dunstan 2007-10-09 15:32:19 Re: Including Snapshot Info with Indexes