Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtiQN-00GvRZ-RH for pgsql-committers@arkaria.postgresql.org; Mon, 08 Apr 2024 06:24:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rtiQM-001IbM-8D for pgsql-committers@arkaria.postgresql.org; Mon, 08 Apr 2024 06:24:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtiQM-001IbC-0m for pgsql-committers@lists.postgresql.org; Mon, 08 Apr 2024 06:24:10 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rtiQJ-001WJN-FU for pgsql-committers@lists.postgresql.org; Mon, 08 Apr 2024 06:24:09 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-29b7164eef6so3328445a91.2 for ; Sun, 07 Apr 2024 23:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712557445; x=1713162245; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=B9ZcNEampHLuAOZp+PaJTFRBztCe9Gt5j0nQp8KVp90=; b=U2L/VJsoOyWJd3Khs3+mnEUtK/1CSosNZsJqTTiPRNNjYAhCH9/NxPHe3rNbskYqLJ jrTSxVBlePpcv73v91T8bWP5PS1lh4ZVtFLRO+l5G3upb883LVgYEIhMNdy9m7RPOQsH DCXxgywl97aTXO+f9/KKOxt7RGs3iAVLDHgz/o8XZj6jMmGYihw2BZ/uMwjCyoes0qJQ gO1rNc/s//0BLB5gmFsxe1rcQNQ0TZH3bWSGeg/Zn6eUOUol3uyVQ/R12YS8J7SJnb7T TqYLA3yIuFFcFiBxvCI7CsS40sR8lItGiz9v5U7rg0umm8kPx3PZxQFJ0ZzUPVdgee1w ab2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712557445; x=1713162245; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=B9ZcNEampHLuAOZp+PaJTFRBztCe9Gt5j0nQp8KVp90=; b=LDE1uVwZMalNTJtAEYxIs/agiwXl4oRT41NQAMyTP/GniWpTLbYyHXrfNFGupmfIW6 /rBbHacwfP5petEpVGnsKpz+/mmyVOAXPG15G6IHZtLvVrvAowIgvMZu7BE2w9v+UZwq RiaBqvz/Sd4/SYQhsKaW9Z+5dNTOsLsX0y+JbASNyThUJzh0Veeefw0It662Z3dJ0bTT yuqFOMjXgsBgLUoNYHG1u8qbOLDL6j7XA3zh9YQ80W997qkFhN4SnoLlg4H9SserFNDI HZ3ajiTlgDVkeYe0zRa70Bh38Z4PT2Ee/HKqRhQhbfGuwNmYWL6MU0bl0G9UBb4j7rV7 XNgg== X-Gm-Message-State: AOJu0YyJ/HeX8wbRIg39Y+eDEa+7g34SZOi7/RAR2x3nueBKHNHFljQn fZGuo6ISgsKdxBaHHw8n77B9NB65qajXg/u6VMgv4+SQBq0MxT2y X-Google-Smtp-Source: AGHT+IEU68/oYTWxPQYpEEvgZ//wGCfJa4fsPHWS3lmwqF4kr9DgG/yeAHzVHmdrMFNWfzxxZ5NJTw== X-Received: by 2002:a17:90a:f686:b0:2a2:898:f8b6 with SMTP id cl6-20020a17090af68600b002a20898f8b6mr5848606pjb.46.1712557445235; Sun, 07 Apr 2024 23:24:05 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id l13-20020a17090aec0d00b0029c7963a33fsm7456807pjy.10.2024.04.07.23.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 23:24:04 -0700 (PDT) Date: Mon, 08 Apr 2024 15:24:02 +0900 (JST) Message-Id: <20240408.152402.1485994009160660141.horikyota.ntt@gmail.com> To: akorotkov@postgresql.org Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Transform OR clauses to ANY expression From: Kyotaro Horiguchi In-Reply-To: <20240408.144657.1746688590065601661.horikyota.ntt@gmail.com> References: <20240408.144657.1746688590065601661.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Mon, 08 Apr 2024 14:46:57 +0900 (JST), Kyotaro Horiguchi wrote in > At Sun, 07 Apr 2024 22:28:06 +0000, Alexander Korotkov wrote in > > Transform OR clauses to ANY expression > > This commit introduces a message like this: > > > gettext_noop("Set the minimum length of the list of OR clauses to attempt the OR-to-ANY transformation."), > > Unlike the usual phrasing of similar messages in this context, which > use the form "Sets the minimum length of...", this message uses an > imperative form ("Set"). I believe it would be better to align the > tone of this message with the others by changing "Set" to "Sets". > > regards. > > > diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c > index 83e3a59d7e..a527ffe0b0 100644 > --- a/src/backend/utils/misc/guc_tables.c > +++ b/src/backend/utils/misc/guc_tables.c > @@ -3670,7 +3670,7 @@ struct config_int ConfigureNamesInt[] = > > { > {"or_to_any_transform_limit", PGC_USERSET, QUERY_TUNING_OTHER, > - gettext_noop("Set the minimum length of the list of OR clauses to attempt the OR-to-ANY transformation."), > + gettext_noop("Sets the minimum length of the list of OR clauses to attempt the OR-to-ANY transformation."), > gettext_noop("Once the limit is reached, the planner will try to replace expression like " > "'x=c1 OR x=c2 ..' to the expression 'x = ANY(ARRAY[c1,c2,..])'"), > GUC_EXPLAIN Sorry for the sequential posts, but I found the following contruct in the same patch to be quite untranslatable. > errmsg("%s bound of partition \"%s\" is %s %s bound of split partition", > first ? "lower" : "upper", > relname, > defaultPart ? (first ? "less than" : "greater than") : "not equals to", > first ? "lower" : "upper"), > parser_errposition(pstate, datum->location))); I might be misunderstanding this, but if the expressions are correct, the message could be divided into four fixed messages based on "first" and "defaultPart". Alternatively, it might be better to provide simpler explation of the situation. regards. -- Kyotaro Horiguchi NTT Open Source Software Center