On Fri, Oct 2, 2009 at 9:01 PM, Boszormenyi Zoltan <z...@cybertec.at> wrote: > 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.
It would've been nice if you'd changed the subject line before posting these. Also, please update commitfest.postgresql.org appropriately. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers