| From: | Jelte Fennema <Jelte(dot)Fennema(at)microsoft(dot)com> | 
|---|---|
| To: | Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: [PATCH] Optimize json_lex_string by batching character copying | 
| Date: | 2022-06-24 21:48:15 | 
| Message-ID: | PR3PR83MB04762D58A50C9AFDACC08B03F7B49@PR3PR83MB0476.EURPRD83.prod.outlook.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> +           if (copyable_characters_length)
> +           {
> +               /* flush copyable characters */
> +               appendBinaryStringInfo(
> +                                      lex->strval,
> +                                      s - copyable_characters_length,
> +                                      copyable_characters_length);
> +
> +           }
>            break;
> 
> I wonder why copyable_characters_length is not reset after flushing.
It breaks from the loop right after. So copyable_characters_length isn't used 
again and thus resetting is not necessary. But I agree this could use a comment.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2022-06-24 22:08:13 | Hardening PostgreSQL via (optional) ban on local file system access | 
| Previous Message | Tom Lane | 2022-06-24 21:44:05 | Core dump in range_table_mutator() |