From: Juliana Fajardini Date: Tue, 13 May 2025 16:33:31 +0000 (-0300) Subject: pgsql: rename copy in/out response field X-Git-Tag: suricata-8.0.0-rc1~176 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3aa0085a0171db33fad920314eb9b2f695e8c63;p=thirdparty%2Fsuricata.git pgsql: rename copy in/out response field 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 --- diff --git a/doc/userguide/output/eve/eve-json-format.rst b/doc/userguide/output/eve/eve-json-format.rst index 0ad3a38468..7a5c9ff94c 100644 --- a/doc/userguide/output/eve/eve-json-format.rst +++ b/doc/userguide/output/eve/eve-json-format.rst @@ -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 diff --git a/etc/schema.json b/etc/schema.json index 78c2f685dd..53ba9e2350 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -3813,7 +3813,7 @@ "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" } @@ -3823,7 +3823,7 @@ "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" } diff --git a/rust/src/pgsql/logger.rs b/rust/src/pgsql/logger.rs index b98874d5b1..f6053515bf 100644 --- a/rust/src/pgsql/logger.rs +++ b/rust/src/pgsql/logger.rs @@ -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 {