Typo fixes in src/backend/rewrite/rewriteHandler.c - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Typo fixes in src/backend/rewrite/rewriteHandler.c
Date
Msg-id 542CF6E2.5000707@lab.ntt.co.jp
Whole thread Raw
Responses Re: Typo fixes in src/backend/rewrite/rewriteHandler.c
List pgsql-hackers
Here is the comments in process_matched_tle() in rewriteHandler.c.

883      * such nodes; consider
884      *      UPDATE tab SET col.fld1.subfld1 = x, col.fld2.subfld2 = y
885      * The two expressions produced by the parser will look like
886      *      FieldStore(col, fld1, FieldStore(placeholder, subfld1, x))
887      *      FieldStore(col, fld2, FieldStore(placeholder, subfld2, x))

I think the second one is not correct and should be

                FieldStore(col, fld2, FieldStore(placeholder, subfld2, y))

Just like this,

891      *      FieldStore(FieldStore(col, fld1,
892      *                            FieldStore(placeholder, subfld1, x)),
893      *                 fld2, FieldStore(placeholder, subfld2, x))

should be

                FieldStore(FieldStore(col, fld1,
                                      FieldStore(placeholder, subfld1, x)),
                           fld2, FieldStore(placeholder, subfld2, y))

Patch attached.

Thanks,

Best regards,
Etsuro Fujita

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Escaping from blocked send() reprised.
Next
From: Heikki Linnakangas
Date:
Subject: Re: UPSERT wiki page, and SQL MERGE syntax