pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JUMBLE_SIZE macro in two files
6+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2022-10-05 839c2520a7  Remove definition of JUMBLE_SIZE from queryjumble.h
* JUMBLE_SIZE macro in two files
@ 2022-10-04 08:41  bt22nakamorit <bt22nakamorit@oss.nttdata.com>
  0 siblings, 2 replies; 6+ messages in thread

From: bt22nakamorit @ 2022-10-04 08:41 UTC (permalink / raw)
  To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

Hi,

queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition 
in queryjumble.c should be deleted.
Thoughts?

Tatsu

Attachments:

jumbsize_def.patch (text/x-diff, 476B) download diff --git a/src/backend/utils/misc/queryjumble.c b/src/backend/utils/misc/queryjumble.c index a8508463e7..dd1ffbd546 100644 --- a/src/backend/utils/misc/queryjumble.c +++ b/src/backend/utils/misc/queryjumble.c @@ -37,8 +37,6 @@ #include "parser/scansup.h" #include "utils/queryjumble.h" -#define JUMBLE_SIZE 1024 /* query serialization buffer size */ - /* GUC parameters */ int compute_query_id = COMPUTE_QUERY_ID_AUTO;
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: JUMBLE_SIZE macro in two files
@ 2022-10-04 10:46  Julien Rouhaud <rjuju123@gmail.com>
  parent: bt22nakamorit <bt22nakamorit@oss.nttdata.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Julien Rouhaud @ 2022-10-04 10:46 UTC (permalink / raw)
  To: bt22nakamorit <bt22nakamorit@oss.nttdata.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

Hi,

On Tue, Oct 04, 2022 at 05:41:12PM +0900, bt22nakamorit wrote:
>
> queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
> Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition in
> queryjumble.c should be deleted.

+1





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: JUMBLE_SIZE macro in two files
@ 2022-10-04 13:16  Tom Lane <tgl@sss.pgh.pa.us>
  parent: bt22nakamorit <bt22nakamorit@oss.nttdata.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2022-10-04 13:16 UTC (permalink / raw)
  To: bt22nakamorit <bt22nakamorit@oss.nttdata.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

bt22nakamorit <bt22nakamorit@oss.nttdata.com> writes:
> queryjumble.c and queryjumble.h both define a macro JUMBLE_SIZE = 1024.
> Since queryjumble.c includes queryjumble.h, the JUMBLE_SIZE definition 
> in queryjumble.c should be deleted.

I would go more for taking it out of queryjumble.h.  I see no
reason why that constant needs to be world-visible.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: JUMBLE_SIZE macro in two files
@ 2022-10-05 03:12  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Michael Paquier @ 2022-10-05 03:12 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: bt22nakamorit <bt22nakamorit@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:
> I would go more for taking it out of queryjumble.h.  I see no
> reason why that constant needs to be world-visible.

I was just looking at the patch before seeing your reply, and thought
the exact same thing.  Perhaps you'd prefer apply that yourself?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: JUMBLE_SIZE macro in two files
@ 2022-10-05 03:17  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2022-10-05 03:17 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: bt22nakamorit <bt22nakamorit@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Oct 04, 2022 at 09:16:44AM -0400, Tom Lane wrote:
>> I would go more for taking it out of queryjumble.h.  I see no
>> reason why that constant needs to be world-visible.

> I was just looking at the patch before seeing your reply, and thought
> the exact same thing.  Perhaps you'd prefer apply that yourself?

Nah, feel free.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: JUMBLE_SIZE macro in two files
@ 2022-10-05 05:29  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2022-10-05 05:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: bt22nakamorit <bt22nakamorit@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Tue, Oct 04, 2022 at 11:17:09PM -0400, Tom Lane wrote:
> Nah, feel free.

Okay, thanks.  Applied, then.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2022-10-05 05:29 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 08:41 JUMBLE_SIZE macro in two files bt22nakamorit <bt22nakamorit@oss.nttdata.com>
2022-10-04 10:46 ` Julien Rouhaud <rjuju123@gmail.com>
2022-10-04 13:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-05 03:12   ` Michael Paquier <michael@paquier.xyz>
2022-10-05 03:17     ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-05 05:29       ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox