Re: GSOC13 proposal - extend RETURNING syntax - Mailing list pgsql-hackers

From Boszormenyi Zoltan
Subject Re: GSOC13 proposal - extend RETURNING syntax
Date
Msg-id 52127767.7080206@cybertec.at
Whole thread Raw
In response to Re: GSOC13 proposal - extend RETURNING syntax  (Karol Trzcionka <karlikt@gmail.com>)
Responses Re: GSOC13 proposal - extend RETURNING syntax
List pgsql-hackers
2013-08-19 21:21 keltezéssel, Karol Trzcionka írta:
> W dniu 19.08.2013 19:56, Boszormenyi Zoltan pisze:
>> * Does it apply cleanly to the current git master?
>>
>> No. There's a reject in src/backend/optimizer/plan/initsplan.c
> Thank you, merged in attached version.
>> * Does it include reasonable tests?
>>
>> Yes but the test fails after trying to fix the rejected chunk of the
>> patch.
> It fails because the "HINT" was changed, fixed.
> That version merges some nested "ifs" left over from earlier work.

I tried to compile your v5 patch and I got:

initsplan.c: In function ‘add_vars_to_targetlist’:
initsplan.c:216:26: warning: ‘rel’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
rel->reltargetlist = lappend(rel->reltargetlist,
^

You shouldn't change the assignment at declaration:

- RelOptInfo *rel = find_base_rel(root, var->varno);
+ RelOptInfo *rel;
...
+ if (root->parse->commandType == CMD_UPDATE)
+ {
... (code using rel)
+ }
+ rel = find_base_rel(root, varno);

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

> Regards,
> Karol Trzcionka


-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de     http://www.postgresql.at/




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm
Next
From: Andres Freund
Date:
Subject: Re: danger of stats_temp_directory = /dev/shm