On 2017/04/18 16:54, Kang Yuzhe wrote:
> Thanks Amit for taking your time and pointing to some useful stuff on the
> Internals of PostgreSQL.
> One thing I have learned is that PG community is not as hostile/harsh as I
> imagined to newbies. Rather, its the reverse.
> I am feeling at home here.
> Amit, would you please help out on how to apply some patches in PG source
> code. For example, there are two patches attached here: one on
> CORRESPONDING CLAUSE and one on MERGE SQL Standard.
> There are some errors saying Hunk failed(src/backend/parser/gram.y.rej).
> postgresql-9.6.2$ patch --dry-run -p1 < corresponding_clause_v12.patch
> patching file doc/src/sgml/queries.sgml
> Hunk #1 succeeded at 1603 (offset 2 lines).
> Hunk #2 succeeded at 1622 (offset 2 lines).
> Hunk #3 succeeded at 1664 (offset 2 lines).
[ ... ]
Firstly, it looks like you're trying to apply the patch to the 9.6 source
tree (are you working with the PostgreSQL source git repository?). But,
since all the new feature patches are created against the master
development branch of the git repository, the patch most likely won't
apply cleanly against a source tree from the older branch.
If you're not using the git repository currently, you may have better luck
trying the development branch snapshot tarballs (see the link below):
Also, it's a good idea to reply on the email thread from where you
downloaded the patch to ask them to update the patch, so that they can
send a fresh patch that applies cleanly.
The MERGE patch looks very old (from 2010 probably), so properly applying
it to the source tree of today is going to be hard. Actually, it most
likely won't be in a working condition anymore. You can try recently
proposed patches, for example, those in the next commitfest:
Patches listed on the above page are more likely to apply cleanly and be
in working condition. But of course, you will need to be interested in
the topics those patches are related to. There are some new SQL feature
patches, for example:
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: