Closed grib0 closed 7 months ago
Hi,
The normalization is correct. Actually the normalization concern the parameters for bind queries. pgbadger use this normalization with bind parameters to create the examples. In your sample log, the query is the following:
LOG: duration: 5627.478 ms execute <unnamed>: select public.t_journee.jou_id, public.t_journee.jou_date from public.t_journee where ((public.t_journee.jou_date in (cast($1 as date), cast($2 as date), cast($3 as date)))
and the bind parameters are given in another log line:
DETAIL: parameters: $1 = '2023-11-06', $2 = '2023-11-07', $3 = '2023-11-08', $4 = '2023-11-09'
to be able to construct a valid example, the cast call must remain in the normalized query otherwise they will be lost.
The following request fails to be normalized correctly with pgbadger 12.2
I would expect to have the queries normalized in one query instead of 2
select public.t_journee.jou_id, public.t_journee.jou_date from public.t_journee where (public.t_journee.jou_date in (...))
pgbadger -f stderr postgresql_log_pb_cast.log
postgresql_log_pb_cast.log