agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
[PATCH v1] Reject too many arguments in CREATE TRIGGER
307+ messages / 1 participants
[nested] [flat]

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----






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

* [PATCH v1] Reject too many arguments in CREATE TRIGGER
@ 2026-08-19 02:40  Kyotaro Horiguchi <horikyota.ntt@gmail.com>
  0 siblings, 0 replies; 307+ messages in thread

From: Kyotaro Horiguchi @ 2026-08-19 02:40 UTC (permalink / raw)

The number of trigger arguments is stored as an int16, but there was no
check that the number of arguments fits in that type.  This could result
in an invalid negative value being stored.

Check that the number of arguments does not exceed INT16_MAX.
---
 src/backend/commands/trigger.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index b7881bf4a29..304cc1e7ace 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -897,9 +897,16 @@ CreateTriggerFiringOn(const CreateTrigStmt *stmt, const char *queryString,
 	{
 		ListCell   *le;
 		char	   *args;
-		int16		nargs = list_length(stmt->args);
+		int			nargs = list_length(stmt->args); 
 		int			len = 0;
 
+		Assert(nargs >= 0);
+		if (nargs > INT16_MAX)
+			ereport(ERROR,
+					errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+					errmsg("triggers cannot have more than %d arguments",
+						   INT16_MAX));
+					
 		foreach(le, stmt->args)
 		{
 			char	   *ar = strVal(lfirst(le));
-- 
2.52.0


----Next_Part(Wed_Aug_19_11_56_36_2026_742)----





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


end of thread, other threads:[~2026-08-19 02:40 UTC | newest]

Thread overview: 307+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>
2026-08-19 02:40 [PATCH v1] Reject too many arguments in CREATE TRIGGER Kyotaro Horiguchi <horikyota.ntt@gmail.com>

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