agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH 7/7] WIP: doc review: Add DECLARE STATEMENT command to ECPG
4+ messages / 3 participants
[nested] [flat]

* [PATCH 7/7] WIP: doc review: Add DECLARE STATEMENT command to ECPG
@ 2021-04-02 14:23  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Justin Pryzby @ 2021-04-02 14:23 UTC (permalink / raw)

ad8305a43d1890768a613d3fb586b44f17360f29
---
 doc/src/sgml/ecpg.sgml | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 56f5d9b5db..8f2908823a 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -354,14 +354,14 @@ current=testdb1 (should be testdb1)
   </para>
 
   <para>
-  The third option is to declare sql identifier linked to
+  The third option is to declare a SQL identifier linked to
   the connection, for example:
 <programlisting>
 EXEC SQL AT <replaceable>connection-name</replaceable> DECLARE <replaceable>statement-name</replaceable> STATEMENT;
 EXEC SQL PREPARE <replaceable>statement-name</replaceable> FROM :<replaceable>dyn-string</replaceable>;
 </programlisting>
-   Once you link a sql identifier to a connection, you execute a dynamic SQL
-   without AT clause. Note that this option behaves like preprocessor directives,
+   Once you link a SQL identifier to a connection, you execute dynamic SQL
+   without an AT clause. Note that this option behaves like preprocessor directives,
    therefore the link is enabled only in the file.
   </para>
   <para>
@@ -6911,14 +6911,14 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
     <title>Description</title>
 
     <para>
-     <command>DECLARE STATEMENT</command> declares SQL statement identifier.
+     <command>DECLARE STATEMENT</command> declares a SQL statement identifier.
      SQL statement identifier can be associated with the connection.
-     When the identifier is used by dynamic SQL statements, these SQLs are executed
-     by using the associated connection.
+     When the identifier is used by dynamic SQL statements, the statements are executed
+     using the associated connection.
      The namespace of the declaration is the precompile unit, and multiple declarations to
-     the same SQL statement identifier is not allowed.
+     the same SQL statement identifier are not allowed.
 
-     Note that if the precompiler run in the Informix compatibility mode and some SQL statement
+     Note that if the precompiler runs in Informix compatibility mode and some SQL statement
      is declared, "database" can not be used as a cursor name.
     </para>
    </refsect1>
-- 
2.17.0


--TB36FDmn/VVEgNH/--





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

* [PATCH 05/27] WIP: doc review: Add DECLARE STATEMENT command to ECPG
@ 2021-04-02 14:23  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Justin Pryzby @ 2021-04-02 14:23 UTC (permalink / raw)

declared
ad8305a43d1890768a613d3fb586b44f17360f29
---
 doc/src/sgml/ecpg.sgml             | 16 ++++++++--------
 src/backend/tsearch/spell.c        |  2 +-
 src/interfaces/ecpg/preproc/ecpg.c |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 56f5d9b5db..8f2908823a 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -354,14 +354,14 @@ current=testdb1 (should be testdb1)
   </para>
 
   <para>
-  The third option is to declare sql identifier linked to
+  The third option is to declare a SQL identifier linked to
   the connection, for example:
 <programlisting>
 EXEC SQL AT <replaceable>connection-name</replaceable> DECLARE <replaceable>statement-name</replaceable> STATEMENT;
 EXEC SQL PREPARE <replaceable>statement-name</replaceable> FROM :<replaceable>dyn-string</replaceable>;
 </programlisting>
-   Once you link a sql identifier to a connection, you execute a dynamic SQL
-   without AT clause. Note that this option behaves like preprocessor directives,
+   Once you link a SQL identifier to a connection, you execute dynamic SQL
+   without an AT clause. Note that this option behaves like preprocessor directives,
    therefore the link is enabled only in the file.
   </para>
   <para>
@@ -6911,14 +6911,14 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
     <title>Description</title>
 
     <para>
-     <command>DECLARE STATEMENT</command> declares SQL statement identifier.
+     <command>DECLARE STATEMENT</command> declares a SQL statement identifier.
      SQL statement identifier can be associated with the connection.
-     When the identifier is used by dynamic SQL statements, these SQLs are executed
-     by using the associated connection.
+     When the identifier is used by dynamic SQL statements, the statements are executed
+     using the associated connection.
      The namespace of the declaration is the precompile unit, and multiple declarations to
-     the same SQL statement identifier is not allowed.
+     the same SQL statement identifier are not allowed.
 
-     Note that if the precompiler run in the Informix compatibility mode and some SQL statement
+     Note that if the precompiler runs in Informix compatibility mode and some SQL statement
      is declared, "database" can not be used as a cursor name.
     </para>
    </refsect1>
diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c
index 68160bd592..ebc89604ac 100644
--- a/src/backend/tsearch/spell.c
+++ b/src/backend/tsearch/spell.c
@@ -2020,7 +2020,7 @@ NISortAffixes(IspellDict *Conf)
 						 (const unsigned char *) Affix->repl,
 						 (ptr - 1)->len))
 			{
-				/* leave only unique and minimals suffixes */
+				/* leave only unique and minimal suffixes */
 				ptr->affix = Affix->repl;
 				ptr->len = Affix->replen;
 				ptr->issuffix = issuffix;
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index ee2fa51588..9d861b428b 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -375,7 +375,7 @@ main(int argc, char *const argv[])
 				}
 				cur = NULL;
 
-				/* remove old delared statements if any are still there */
+				/* remove old declared statements if any are still there */
 				for (list = g_declared_list; list != NULL;)
 				{
 					struct declared_list *this = list;
-- 
2.17.0


--2fHTh5uZTiUOsy+g
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0006-BRIN-minmax-multi-indexes-between-procedures-dedupli.patch"



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

* Re: Integer undeflow in fprintf in dsa.c
@ 2024-02-20 12:22  Robert Haas <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Robert Haas @ 2024-02-20 12:22 UTC (permalink / raw)
  To: Daniel Gustafsson <[email protected]>; +Cc: Ильясов Ян <[email protected]>; pgsql-hackers

On Tue, Feb 20, 2024 at 5:30 PM Daniel Gustafsson <[email protected]> wrote:
> The message "at least 0 contiguous pages free" reads a bit nonsensical though,
> wouldn't it be preferrable to check for i being zero and print a custom message
> for that case? Something like the below untested sketch?
>
> +                       if (i == 0)
> +                               fprintf(stderr,
> +                                               "    segment bin %zu (no contiguous free pages):\n", i);
> +                       else
> +                               fprintf(stderr,
> +                                               "    segment bin %zu (at least %d contiguous pages free):\n",
> +                                               i, 1 << (i - 1));

That does seem reasonable. However, this is just debugging code, so it
also probably isn't necessary to sweat anything too much.

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






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

* RE: Integer undeflow in fprintf in dsa.c
@ 2024-02-20 16:13  Ilyasov Ian <[email protected]>
  parent: Robert Haas <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Ilyasov Ian @ 2024-02-20 16:13 UTC (permalink / raw)
  To: Robert Haas <[email protected]>; Daniel Gustafsson <[email protected]>; pgsql-hackers

Sorry for not answering quickly.

Thank you for your comments.

I attached a patch to the letter with changes to take into account Daniel Gustafsson's comment.


Kind regards,
Ian Ilyasov.

Juniour Software Developer at Postgres Professional


Attachments:

  [text/x-patch] Integer_underflow_fix_in_fprintf_in_dsa.patch (987B, ../../GV1P251MB10045C9CED3BF05928C61011CD502@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM/3-Integer_underflow_fix_in_fprintf_in_dsa.patch)
  download | inline diff:
Subject: [PATCH] Integer underflow fix in fprintf in dsa.c.
---
Index: src/backend/utils/mmgr/dsa.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
--- a/src/backend/utils/mmgr/dsa.c	(revision b78fa8547d02fc72ace679fb4d5289dccdbfc781)
+++ b/src/backend/utils/mmgr/dsa.c	(date 1708440995707)
@@ -1105,9 +1105,13 @@
 		{
 			dsa_segment_index segment_index;
 
-			fprintf(stderr,
-					"    segment bin %zu (at least %d contiguous pages free):\n",
-					i, 1 << (i - 1));
+			if (i == 0)
+				fprintf(stderr,
+						"    segment bin %zu (no contiguous free pages):\n", i);
+			else
+				fprintf(stderr,
+						"    segment bin %zu (at least %d contiguous pages free):\n",
+						i, 1 << (i - 1));
 			segment_index = area->control->segment_bins[i];
 			while (segment_index != DSA_SEGMENT_INDEX_NONE)
 			{


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


end of thread, other threads:[~2024-02-20 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 14:23 [PATCH 7/7] WIP: doc review: Add DECLARE STATEMENT command to ECPG Justin Pryzby <[email protected]>
2021-04-02 14:23 [PATCH 05/27] WIP: doc review: Add DECLARE STATEMENT command to ECPG Justin Pryzby <[email protected]>
2024-02-20 12:22 Re: Integer undeflow in fprintf in dsa.c Robert Haas <[email protected]>
2024-02-20 16:13 ` RE: Integer undeflow in fprintf in dsa.c Ilyasov Ian <[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