]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pgsql: rename copy in/out response field
authorJuliana Fajardini <jufajardini@oisf.net>
Tue, 13 May 2025 16:33:31 +0000 (13:33 -0300)
committerJuliana Fajardini <jufajardini@oisf.net>
Wed, 4 Jun 2025 18:21:32 +0000 (15:21 -0300)
We used `copy_column_count`, while just `columns` is more accurate with
what PostgreSQL describes, and what Wireshark shows.

Related to
Task #7644
Task #7645

doc/userguide/output/eve/eve-json-format.rst
etc/schema.json
rust/src/pgsql/logger.rs

index 0ad3a384680149105298c723ad63afd0ea2eddfc..7a5c9ff94c1a96ca3d5e948295d5c1c8ef237300 100644 (file)
@@ -2576,9 +2576,9 @@ pgsql flow. Some of the possible request messages are:
   total size in bytes of the data returned
 * "command_completed": string. Informs the command just completed by the backend
 * "copy_in_response": object. Indicates the beginning of a CopyIn mode, shows
-  how many columns will be copied from STDIN (``copy_column_cnt`` field)
+  how many columns will be copied from STDIN (``columns`` field)
 * "copy_out_response": object. Indicates the beginning of a CopyTo mode, shows
-  how many columns will be copied to STDOUT (``copy_column_cnt`` field)
+  how many columns will be copied to STDOUT (``columns`` field)
 * "copy_data_out": object. Consolidated data on the CopyData sent by the backend
   in a CopyOut transaction
 * "copy_done": string. Similar to ``command_completed`` but sent after the
index 78c2f685ddeb82eb2c6b73b375f93ce5a345a582..53ba9e23509523646916d8f23cf3fbbb5885afd8 100644 (file)
                             "type": "object",
                             "description": "Backend/server response accepting CopyIn mode",
                             "properties": {
-                                "copy_column_count": {
+                                "columns": {
                                     "type": "integer",
                                     "description": "Number of columns that will be copied in the CopyData message"
                                 }
                             "type": "object",
                             "description": "Backend/server response accepting CopyOut mode",
                             "properties": {
-                                "copy_column_count": {
+                                "columns": {
                                     "type": "integer",
                                     "description": "Number of columns that will be copied in the CopyData message"
                                 }
index b98874d5b1e9deff7efb551805b3194690548c6e..f6053515bfb0e80cb55e4c80c4d3f7bff44669a6 100644 (file)
@@ -240,7 +240,7 @@ fn log_response(res: &PgsqlBEMessage, jb: &mut JsonBuilder) -> Result<(), JsonEr
             column_cnt,
         }) => {
             jb.open_object(res.to_str())?;
-            jb.set_uint("copy_column_count", *column_cnt)?;
+            jb.set_uint("columns", *column_cnt)?;
             jb.close()?;
         }
         PgsqlBEMessage::BackendKeyData(BackendKeyDataMessage {