wCTE behaviour

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: pgsql-hackers(at)postgresql(dot)org
Subject: wCTE behaviour
Date: 2010-11-11 02:15:34
Message-ID: 4CDB51C6.3080509@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

The discussion around wCTE during the last week or so has brought to my
attention that we don't actually have a consensus on how exactly wCTEs
should behave. The question seems to be whether or not a statement
should see the modifications of statements ran before it. While I think
making the modifications visible would be a lot more intuitive, it's not
clear how we'd optimize the execution in the future without changing the
behaviour (triggers are a big concern).

I've done some digging today and it seems that IBM's DB2 took the more
intuitive approach: all statements are ran, in the order they're written
in, to completion before the main statement, materializing the "deltas"
into a temporary table and the modifications are made visible to the
next statements.

I have no idea how many complaints they have received about this
behaviour, but I'd be in favor of matching it.

Thoughts?

Regards,
Marko Tiikkaja

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-11-11 06:38:20 Re: Exposing an installation's default value of unix_socket_directory
Previous Message Vaibhav Kaushal 2010-11-11 01:57:34 Re: Which file does the SELECT?