Re: CommitFest 2009-09, two weeks on

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Michael Meskes <meskes(at)postgresql(dot)org>, Dan Colish <dan(at)unencrypted(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Re: CommitFest 2009-09, two weeks on
Date: 2009-10-03 01:01:28
Message-ID: 4AC6A268.6090600@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Michael Meskes írta:
> It is accepted either way. I was just pointing out that it might be easier to
> review/commit at least parts of your patches if they can be applied seperately.
>

I have split up (and cleaned up a little) the dynamic
cursorname patch into smaller logical, easier-to-review
pieces. Descriptions below.

1) 1a-unified-optfromin-fetch-ctxdiff.patch

ecpg supports optional FROM/IN in FETCH and
MOVE statements (mainly because it's required by
Informix-compatibility). Unify core and ecpg grammar
as per Tom Lane's suggestion.

2) 1b-cursor_name-ctxdiff.patch

"name" -> "cursor_name" transition in core grammar
and ecpg grammar. Currently it does nothing, it's a
preparation phase. Depends on patch 1.

3) 1c-remove-var-from-list.patch

Introduce function remove_variable_from_list().
It is used by the dynamic cursor, SQLDA and DESCRIBE
patches for different reasons. Applicable separately.

4) 1d-dynamiccur-ctxdiff.patch

The real point of the whole series in this email.
Extend "cursor_name" in the ecpg grammar to actually
accept a character variable. The cursorname-as-variable
is replaced in the final SQL script with a $0 placeholder.
Doesn't compile as-is, requires patch 5 to get the
two shift/reduce conflicts fixed. Depends on patches
1, 2 and 3.

5) 1e-fix-shiftreduce-ctxdiff.patch

De-factorize "BACKWARD opt_from_in cursor_name"
and "FORWARD opt_from_in cursor_name" out of
fetch_args and pull them up into FetchStmt in the ecpg
grammar. Depends on patch 4.
One line in parse.pl is not clear for me:
$replace_line{'fetch_args'} = 'ignore';
The genarated preproc.y is the same with or without
this line. But as the previous version had it with
"fetch_direction", I left it in.

6) 1f-cursorname-in-varchar-ctxdiff.patch

Allow that varchar can be used as cursorname as well.
Other character variable types were already supported.
Depends on patch 4.

7) 1g-regressiontests-ctxdiff.patch

Introduce cursor.pgc regression test for both native
and compat mode. Depends on all patches.

8) 1h-fix-parse.pl-ctxdiff.patch

Now useless patch, in the previous dynamic cursorname
patch the following scenario occured: the same rule
had both an "addon" and a "rule" extension. Without
this fix, the following code was generated in preproc.y:
ruleA: <accepted syntax>
{
<addon code block>
{
<automatic code block>
}
With the cleanup I did during this splitup, this scenario
doesn't happen, but this fix may be considered useful.
Applicable separately.

After every patch (except 4) both the core and ecpg
"make check" are successful.

Best regards,
Zoltán Böszörményi

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

Attachment Content-Type Size
1a-unified-optfromin-fetch-ctxdiff.patch text/x-patch 16.2 KB
1b-cursor_name-ctxdiff.patch text/x-patch 13.6 KB
1c-remove-var-from-list-ctxdiff.patch text/x-patch 1.9 KB
1d-dynamiccur-ctxdiff.patch text/x-patch 7.1 KB
1e-fix-shiftreduce-ctxdiff.patch text/x-patch 4.6 KB
1f-cursorname-in-varchar-ctxdiff.patch text/x-patch 2.1 KB
1g-regressiontests-ctxdiff.patch text/x-patch 108.3 KB
1h-fix-parse.pl-ctxdiff.patch text/x-patch 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-10-03 01:03:23 Re: CommitFest 2009-09, two weeks on
Previous Message Brad T. Sliger 2009-10-03 00:34:16 Re: Unicode UTF-8 table formatting for psql text output