Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
От | Bharath Rupireddy |
---|---|
Тема | Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM |
Дата | |
Msg-id | CALj2ACV697yS=kD_rt4ms4A+Dx1FyXiYcmGEZuPEYPJF0SC49A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM (vignesh C <vignesh21@gmail.com>) |
Ответы |
Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
|
Список | pgsql-hackers |
Thanks Vignesh and Rushabh for reviewing this. I've added this patch to commitfest - https://commitfest.postgresql.org/28/. Request community take this patch further if there are no further issues. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com On Sat, Jun 27, 2020 at 6:30 PM vignesh C <vignesh21@gmail.com> wrote: > > On Sat, Jun 27, 2020 at 9:23 AM Bharath Rupireddy > <bharath.rupireddyforpostgres@gmail.com> wrote: > > > > Thanks Rushabh and Vignesh for the comments. > > > > > > > > One comment: > > > We could change below code: > > > + */ > > > + if (!cstate->binary) > > > + cstate->raw_buf = (char *) palloc(RAW_BUF_SIZE + 1); > > > + else > > > + cstate->raw_buf = NULL; > > > to: > > > cstate->raw_buf = (cstate->binary) ? NULL : (char *) palloc(RAW_BUF_SIZE + 1); > > > > > > > Attached the patch with the above changes. > > Changes look fine to me. > > Regards, > Vignesh > EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: