public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v1] Language fixen for 15cb2bd27009f73a84a35c2ba60fdd105b4bf263
4+ messages / 3 participants
[nested] [flat]

* [PATCH v1] Language fixen for 15cb2bd27009f73a84a35c2ba60fdd105b4bf263
@ 2020-06-20 21:37  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Justin Pryzby @ 2020-06-20 21:37 UTC (permalink / raw)

---
 doc/src/sgml/brin.sgml   | 12 ++++++------
 doc/src/sgml/btree.sgml  | 12 ++++++------
 doc/src/sgml/gin.sgml    | 10 +++++-----
 doc/src/sgml/gist.sgml   | 18 +++++++++---------
 doc/src/sgml/spgist.sgml |  6 +++---
 doc/src/sgml/xindex.sgml | 18 +++++++++---------
 6 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml
index d7f1af7819..4c5eeb875f 100644
--- a/doc/src/sgml/brin.sgml
+++ b/doc/src/sgml/brin.sgml
@@ -562,7 +562,7 @@ typedef struct BrinOpcInfo
    </varlistentry>
   </variablelist>
 
-  Optionally, an operator class for <acronym>BRIN</acronym> can supply the
+  An operator class for <acronym>BRIN</acronym> can optionally specify the
   following method:
 
   <variablelist>
@@ -570,22 +570,22 @@ typedef struct BrinOpcInfo
      <term><function>void options(local_relopts *relopts)</function></term>
      <listitem>
       <para>
-       Defines set of user-visible parameters that control operator class
+       Defines a set of user-visible parameters that control operator class
        behavior.
       </para>
 
       <para>
-       The <function>options</function> function has given pointer to
+       The <function>options</function> function is passed a pointer to a
        <replaceable>local_relopts</replaceable> struct, which needs to be
        filled with a set of operator class specific options.  The options
-       can be accessed from other support functions using
+       can be accessed from other support functions using the
        <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
-       Since both key extraction for indexed value and representation of the
-       key in <acronym>GIN</acronym> are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in <acronym>GIN</acronym> are flexible, they may depend on
        user-specified parameters.
       </para>
      </listitem>
diff --git a/doc/src/sgml/btree.sgml b/doc/src/sgml/btree.sgml
index 2c4dd48ea3..b17b166e84 100644
--- a/doc/src/sgml/btree.sgml
+++ b/doc/src/sgml/btree.sgml
@@ -557,7 +557,7 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
      Optionally, a B-tree operator family may provide
      <function>options</function> (<quote>operator class specific
      options</quote>) support functions, registered under support
-     function number 5.  These functions define set of user-visible
+     function number 5.  These functions define a set of user-visible
      parameters that control operator class behavior.
     </para>
     <para>
@@ -566,19 +566,19 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
 <synopsis>
 options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns void
 </synopsis>
-     The function has given pointer to <replaceable>local_relopts</replaceable>
+     The function is passed a pointer to a <replaceable>local_relopts</replaceable>
      struct, which needs to be filled with a set of operator class
      specific options.  The options can be accessed from other support
-     functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+     functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
      <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
     </para>
     <para>
-     Currently, no B-Tree operator class has <function>options</function>
+     Currently, no B-Tree operator class has an <function>options</function>
      support function.  B-tree doesn't allow flexible representation of keys
      like GiST, SP-GiST, GIN and BRIN do.  So, <function>options</function>
-     probably doesn't have much usage in current shape of B-tree index
+     probably doesn't have much application in the current B-tree index
      access method.  Nevertheless, this support function was added to B-tree
-     for uniformity, and probably it will found its usage during further
+     for uniformity, and will probably find uses during further
      evolution of B-tree in <productname>PostgreSQL</productname>.
     </para>
    </listitem>
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index d85e7c8796..7a8c18a449 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -411,17 +411,17 @@
       </para>
 
       <para>
-       The <function>options</function> function has given pointer to
+       The <function>options</function> function is passed a pointer to a
        <replaceable>local_relopts</replaceable> struct, which needs to be
-       filled with s set of operator class specific options.  The options
-       can be accessed from other support functions using
+       filled with a set of operator class specific options.  The options
+       can be accessed from other support functions using the
        <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
-       Since both key extraction for indexed value and representation of the
-       key in <acronym>GIN</acronym> are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in <acronym>GIN</acronym> are flexible, they may depend on
        user-specified parameters.
       </para>
      </listitem>
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 31c28fdb61..5d970ee9f2 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -946,7 +946,7 @@ my_fetch(PG_FUNCTION_ARGS)
      <term><function>options</function></term>
      <listitem>
       <para>
-       Allows defintion of user-visible parameters that control operator
+       Allows definition of user-visible parameters that control operator
        class behavior.
       </para>
 
@@ -962,16 +962,16 @@ LANGUAGE C STRICT;
       </para>
 
       <para>
-       The function has given pointer to <replaceable>local_relopts</replaceable>
+       The function is passed a pointer to a <replaceable>local_relopts</replaceable>
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+       functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
        <para>
-        The sample implementation of my_option() and parameters usage
-        in the another support function are given below:
+        An example implementation of my_options() and parameters use
+        from other support functions are given below:
 
 <programlisting>
 typedef enum MyEnumType
@@ -990,7 +990,7 @@ typedef struct
     int     str_param;  /* string parameter */
 } MyOptionsStruct;
 
-/* String representations for enum values */
+/* String representation of enum values */
 static relopt_enum_elt_def myEnumValues[] =
 {
     {"on", MY_ENUM_ON},
@@ -1002,7 +1002,7 @@ static relopt_enum_elt_def myEnumValues[] =
 static char *str_param_default = "default";
 
 /*
- * Sample validatior: checks that string is not longer than 8 bytes.
+ * Sample validator: checks that string is not longer than 8 bytes.
  */
 static void 
 validate_my_string_relopt(const char *value)
@@ -1090,8 +1090,8 @@ my_compress(PG_FUNCTION_ARGS)
 
       <para>
        Since the representation of the key in <acronym>GiST</acronym> is
-       flexible, it may depends on user-specified parameters.  For instace,
-       the length of key signature may be such parameter.  See
+       flexible, it may depend on user-specified parameters.  For instance,
+       the length of key signature may be specified.  See
        <literal>gtsvector_options()</literal> for example.
       </para>
      </listitem>
diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml
index 03f914735b..1395dbaf88 100644
--- a/doc/src/sgml/spgist.sgml
+++ b/doc/src/sgml/spgist.sgml
@@ -895,16 +895,16 @@ LANGUAGE C STRICT;
       </para>
 
       <para>
-       The function has given pointer to <replaceable>local_relopts</replaceable>
+       The function is passed a pointer to a <replaceable>local_relopts</replaceable>
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+       functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
        Since the representation of the key in <acronym>SP-GiST</acronym> is
-       flexible, it may depends on user-specified parameters.
+       flexible, it may depend on user-specified parameters.
       </para>
      </listitem>
     </varlistentry>
diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index 0e4587a81b..2cfd71b5b7 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -410,9 +410,9 @@
   </para>
 
   <para>
-   Additionally, some opclasses allow user to set specific parameters, which
-   controls its behavior.  Each builtin index access method have optional
-   <function>options</function> support function, which defines set of
+   Additionally, some opclasses allow users to specify parameters which
+   control their behavior.  Each builtin index access method has an optional
+   <function>options</function> support function, which defines a set of
    opclass-specific parameters.
   </para>
 
@@ -459,7 +459,7 @@
       </row>
       <row>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>5</entry>
@@ -501,7 +501,7 @@
       </row>
       <row>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>3</entry>
@@ -584,7 +584,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>10</entry>
@@ -643,7 +643,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>6</entry>
@@ -720,7 +720,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>7</entry>
@@ -778,7 +778,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>5</entry>
-- 
2.17.0


--W2ydbIOJmkm74tJ2--





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

* [PATCH v2] Language fixen for 15cb2bd27009f73a84a35c2ba60fdd105b4bf263
@ 2020-06-20 21:37  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Justin Pryzby @ 2020-06-20 21:37 UTC (permalink / raw)

---
 doc/src/sgml/brin.sgml   | 12 ++++++------
 doc/src/sgml/btree.sgml  | 12 ++++++------
 doc/src/sgml/gin.sgml    | 10 +++++-----
 doc/src/sgml/gist.sgml   | 18 +++++++++---------
 doc/src/sgml/spgist.sgml | 12 ++++++------
 doc/src/sgml/xindex.sgml | 18 +++++++++---------
 6 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml
index d7f1af7819..4c5eeb875f 100644
--- a/doc/src/sgml/brin.sgml
+++ b/doc/src/sgml/brin.sgml
@@ -562,7 +562,7 @@ typedef struct BrinOpcInfo
    </varlistentry>
   </variablelist>
 
-  Optionally, an operator class for <acronym>BRIN</acronym> can supply the
+  An operator class for <acronym>BRIN</acronym> can optionally specify the
   following method:
 
   <variablelist>
@@ -570,22 +570,22 @@ typedef struct BrinOpcInfo
      <term><function>void options(local_relopts *relopts)</function></term>
      <listitem>
       <para>
-       Defines set of user-visible parameters that control operator class
+       Defines a set of user-visible parameters that control operator class
        behavior.
       </para>
 
       <para>
-       The <function>options</function> function has given pointer to
+       The <function>options</function> function is passed a pointer to a
        <replaceable>local_relopts</replaceable> struct, which needs to be
        filled with a set of operator class specific options.  The options
-       can be accessed from other support functions using
+       can be accessed from other support functions using the
        <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
-       Since both key extraction for indexed value and representation of the
-       key in <acronym>GIN</acronym> are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in <acronym>GIN</acronym> are flexible, they may depend on
        user-specified parameters.
       </para>
      </listitem>
diff --git a/doc/src/sgml/btree.sgml b/doc/src/sgml/btree.sgml
index 661e7ab650..6c2fd453f5 100644
--- a/doc/src/sgml/btree.sgml
+++ b/doc/src/sgml/btree.sgml
@@ -557,7 +557,7 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
      Optionally, a B-tree operator family may provide
      <function>options</function> (<quote>operator class specific
      options</quote>) support functions, registered under support
-     function number 5.  These functions define set of user-visible
+     function number 5.  These functions define a set of user-visible
      parameters that control operator class behavior.
     </para>
     <para>
@@ -566,19 +566,19 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
 <synopsis>
 options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns void
 </synopsis>
-     The function has given pointer to <replaceable>local_relopts</replaceable>
+     The function is passed a pointer to a <replaceable>local_relopts</replaceable>
      struct, which needs to be filled with a set of operator class
      specific options.  The options can be accessed from other support
-     functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+     functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
      <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
     </para>
     <para>
-     Currently, no B-Tree operator class has <function>options</function>
+     Currently, no B-Tree operator class has an <function>options</function>
      support function.  B-tree doesn't allow flexible representation of keys
      like GiST, SP-GiST, GIN and BRIN do.  So, <function>options</function>
-     probably doesn't have much usage in current shape of B-tree index
+     probably doesn't have much application in the current B-tree index
      access method.  Nevertheless, this support function was added to B-tree
-     for uniformity, and probably it will found its usage during further
+     for uniformity, and will probably find uses during further
      evolution of B-tree in <productname>PostgreSQL</productname>.
     </para>
    </listitem>
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index d85e7c8796..7a8c18a449 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -411,17 +411,17 @@
       </para>
 
       <para>
-       The <function>options</function> function has given pointer to
+       The <function>options</function> function is passed a pointer to a
        <replaceable>local_relopts</replaceable> struct, which needs to be
-       filled with s set of operator class specific options.  The options
-       can be accessed from other support functions using
+       filled with a set of operator class specific options.  The options
+       can be accessed from other support functions using the
        <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
-       Since both key extraction for indexed value and representation of the
-       key in <acronym>GIN</acronym> are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in <acronym>GIN</acronym> are flexible, they may depend on
        user-specified parameters.
       </para>
      </listitem>
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 31c28fdb61..5d970ee9f2 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -946,7 +946,7 @@ my_fetch(PG_FUNCTION_ARGS)
      <term><function>options</function></term>
      <listitem>
       <para>
-       Allows defintion of user-visible parameters that control operator
+       Allows definition of user-visible parameters that control operator
        class behavior.
       </para>
 
@@ -962,16 +962,16 @@ LANGUAGE C STRICT;
       </para>
 
       <para>
-       The function has given pointer to <replaceable>local_relopts</replaceable>
+       The function is passed a pointer to a <replaceable>local_relopts</replaceable>
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+       functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
        <para>
-        The sample implementation of my_option() and parameters usage
-        in the another support function are given below:
+        An example implementation of my_options() and parameters use
+        from other support functions are given below:
 
 <programlisting>
 typedef enum MyEnumType
@@ -990,7 +990,7 @@ typedef struct
     int     str_param;  /* string parameter */
 } MyOptionsStruct;
 
-/* String representations for enum values */
+/* String representation of enum values */
 static relopt_enum_elt_def myEnumValues[] =
 {
     {"on", MY_ENUM_ON},
@@ -1002,7 +1002,7 @@ static relopt_enum_elt_def myEnumValues[] =
 static char *str_param_default = "default";
 
 /*
- * Sample validatior: checks that string is not longer than 8 bytes.
+ * Sample validator: checks that string is not longer than 8 bytes.
  */
 static void 
 validate_my_string_relopt(const char *value)
@@ -1090,8 +1090,8 @@ my_compress(PG_FUNCTION_ARGS)
 
       <para>
        Since the representation of the key in <acronym>GiST</acronym> is
-       flexible, it may depends on user-specified parameters.  For instace,
-       the length of key signature may be such parameter.  See
+       flexible, it may depend on user-specified parameters.  For instance,
+       the length of key signature may be specified.  See
        <literal>gtsvector_options()</literal> for example.
       </para>
      </listitem>
diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml
index ad8d348a43..d9ecfe74ed 100644
--- a/doc/src/sgml/spgist.sgml
+++ b/doc/src/sgml/spgist.sgml
@@ -290,13 +290,13 @@
   values for the support method, while the second argument is a pointer to a
   C struct where output values must be placed.  Four of the mandatory methods just
   return <type>void</type>, since all their results appear in the output struct; but
-  <function>leaf_consistent</function> additionally returns a <type>boolean</type> result.
+  <function>leaf_consistent</function> returns a <type>boolean</type> result.
   The methods must not modify any fields of their input structs.  In all
   cases, the output struct is initialized to zeroes before calling the
   user-defined method.  The optional sixth method <function>compress</function>
-  accepts datum to be indexed as the only argument and returns a value suitable
+  accepts a <type>datum</type> to be indexed as the only argument and returns a value suitable
   for physical storage in a leaf tuple.  The optional seventh method
-  <function>options</function> accepts internal pointer to a C struct, where
+  <function>options</function> accepts an <type>internal</type> pointer to a C struct, where
   opclass-specific parameters should be placed, and returns <type>void</type>.
  </para>
 
@@ -897,16 +897,16 @@ LANGUAGE C STRICT;
       </para>
 
       <para>
-       The function has given pointer to <replaceable>local_relopts</replaceable>
+       The function is passed a pointer to a <replaceable>local_relopts</replaceable>
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
+       functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
        <literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
       </para>
 
       <para>
        Since the representation of the key in <acronym>SP-GiST</acronym> is
-       flexible, it may depends on user-specified parameters.
+       flexible, it may depend on user-specified parameters.
       </para>
      </listitem>
     </varlistentry>
diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index 0e4587a81b..2cfd71b5b7 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -410,9 +410,9 @@
   </para>
 
   <para>
-   Additionally, some opclasses allow user to set specific parameters, which
-   controls its behavior.  Each builtin index access method have optional
-   <function>options</function> support function, which defines set of
+   Additionally, some opclasses allow users to specify parameters which
+   control their behavior.  Each builtin index access method has an optional
+   <function>options</function> support function, which defines a set of
    opclass-specific parameters.
   </para>
 
@@ -459,7 +459,7 @@
       </row>
       <row>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>5</entry>
@@ -501,7 +501,7 @@
       </row>
       <row>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>3</entry>
@@ -584,7 +584,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>10</entry>
@@ -643,7 +643,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>6</entry>
@@ -720,7 +720,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>7</entry>
@@ -778,7 +778,7 @@
       <row>
        <entry><function>options</function></entry>
        <entry>
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        </entry>
        <entry>5</entry>
-- 
2.17.0


--envbJBWh7q8WU6mo--





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

* Re: pg_stop_backup() v2 incorrectly marked as proretset
@ 2022-03-02 14:31  Robert Haas <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Robert Haas @ 2022-03-02 14:31 UTC (permalink / raw)
  To: Aleksander Alekseev <[email protected]>; +Cc: Michael Paquier <[email protected]>; Kyotaro Horiguchi <[email protected]>; PostgreSQL Hackers <[email protected]>

On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev
<[email protected]> wrote:
> ```
>  Datum
>  pg_stop_backup_v2(PG_FUNCTION_ARGS)
>  {
> -    ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
> +#define PG_STOP_BACKUP_V2_COLS 3
>      TupleDesc    tupdesc;
> -    Tuplestorestate *tupstore;
> -    MemoryContext per_query_ctx;
> -    MemoryContext oldcontext;
> -    Datum        values[3];
> -    bool        nulls[3];
> +    Datum        values[PG_STOP_BACKUP_V2_COLS];
> +    bool        nulls[PG_STOP_BACKUP_V2_COLS];
> ```
>
> Declaring a macro inside the procedure body is a bit unconventional.
> Since it doesn't seem to be used for anything except these two array
> declarations I suggest keeping simply "3" here.

I think we do this kind of thing in various places in similar
situations, and I think it is good style. It makes it easier to catch
everything if you ever need to update the code.

-- 
Robert Haas
EDB: http://www.enterprisedb.com






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

* Re: pg_stop_backup() v2 incorrectly marked as proretset
@ 2022-03-02 14:35  Tom Lane <[email protected]>
  parent: Robert Haas <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-03-02 14:35 UTC (permalink / raw)
  To: Robert Haas <[email protected]>; +Cc: Aleksander Alekseev <[email protected]>; Michael Paquier <[email protected]>; Kyotaro Horiguchi <[email protected]>; PostgreSQL Hackers <[email protected]>

Robert Haas <[email protected]> writes:
> On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev
> <[email protected]> wrote:
>> Declaring a macro inside the procedure body is a bit unconventional.
>> Since it doesn't seem to be used for anything except these two array
>> declarations I suggest keeping simply "3" here.

> I think we do this kind of thing in various places in similar
> situations, and I think it is good style. It makes it easier to catch
> everything if you ever need to update the code.

Yeah, there's plenty of precedent for that coding if you look around.
I've not read the whole patch, but this snippet seems fine to me
if there's also an #undef at the end of the function.

			regards, tom lane






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


end of thread, other threads:[~2022-03-02 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 21:37 [PATCH v1] Language fixen for 15cb2bd27009f73a84a35c2ba60fdd105b4bf263 Justin Pryzby <[email protected]>
2020-06-20 21:37 [PATCH v2] Language fixen for 15cb2bd27009f73a84a35c2ba60fdd105b4bf263 Justin Pryzby <[email protected]>
2022-03-02 14:31 Re: pg_stop_backup() v2 incorrectly marked as proretset Robert Haas <[email protected]>
2022-03-02 14:35 ` Re: pg_stop_backup() v2 incorrectly marked as proretset Tom Lane <[email protected]>

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