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

Re: Review of Writeable CTE Patch

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review of Writeable CTE Patch
Date: 2010-01-27 01:28:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Here's an updated patch.  This includes the fix mentioned earlier, some
comment improvements and making CopySnapshot() static again.  I also
changed all references to this feature to "DML WITH" for consistency.
I'm not sure if we want to keep it, but it should now be easier to
change in the future.

On 2010-01-26 16:13, Merlin Moncure wrote:
> Marko was already aware of it and has a fix ready.

This one includes it.

> *) I tested most of the error conditions and got them to fire.  No
> unpleasant surprises.  The cursor error ("Non-SELECT cursors are not
> implemented") is a little misleading.  Perhaps it should read
> something like "Writeable CTE are not supported in cusor declaration"

Ok, changed this one.

> *) execMain.c Line 1224
> There is a blank code comment here.  IMO this section needs to be
> documented better: the
> CommandCounterIncrement is a critical part of how this works.

Added some more comments.

> *) execMain.c Line 2033
> The adjusted comment is confusing and seems to contradict itself.  I
> would have wriiten: initialize them if they are not run in
> EvalPlanQual().  Aside: is this an optimization?

I tried, but I can't think of a better wording for that comment :-(
This is not really an optimization, just doing the right thing.  The
performance difference here is negligible.

> *) CopySnapshot was promoted from static.  Is this legal/good idea?
> Is a wrapper more appropriate?

Added new function RegisterSnapshotCopy() per Alvaro's suggestion.

Thanks a lot for reviewing!

Marko Tiikkaja

Attachment: dmlwith6.patch
Description: text/plain (68.6 KB)

In response to


pgsql-hackers by date

Next:From: Baron SchwartzDate: 2010-01-27 02:21:32
Subject: Re: MySQL-ism help patch for psql
Previous:From: Andrew DunstanDate: 2010-01-26 23:51:53
Subject: Re: Add on_perl_init and proper destruction to plperl [PATCH]

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