14:50:34.620 [error] GenServer {:endpoints, {1, %{"iso_timestamp_end" => "", "iso_timestamp_start" => "2025-07-08T13:50:34.528Z", "project_tier" => "ENTERPRISE", "ref" => "default", "sql" => "select identifier, postgres_logs.timestamp, id, event_message, parsed.error_severity, parsed.query\nfrom postgres_logs\n cross join unnest(metadata) as m\n cross join unnest(m.parsed) as parsed\nwhere (parsed.application_name = 'pg_cron' OR event_message LIKE '%cron job%')\norder by timestamp desc\nlimit 100\n", "token_or_name" => "logs.all"}}} terminating ** (MatchError) no match of right hand side value: {:error, %Postgrex.Error{message: nil, postgres: %{code: :undefined_column, line: "3656", message: "column \"body\" does not exist", position: "8863", file: "parse_relation.c", unknown: "ERROR", severity: "ERROR", routine: "errorMissingColumn", pg_code: "42703"}, connection_id: 67, query: "WITH retention AS (SELECT (CASE WHEN $1::text = 'FREE' THEN current_timestamp - INTERVAL '1 day' WHEN $2::text = 'PRO' THEN current_timestamp - INTERVAL '7 day' WHEN ($3::text = 'PAYG' OR $4::text = 'ENTERPRISE') THEN current_timestamp - INTERVAL '90 day' ELSE current_timestamp - INTERVAL '1 day' END) AS date), edge_logs AS (SELECT (t.body -> 'timestamp') AS timestamp, (t.body -> 'id') AS id, (t.body -> 'event_message') AS event_message, (t.body -> 'metadata') AS metadata FROM retention, \"_analytics\".\"log_events_d11094d1_992b_4d1d_b99a_96fb489a3a5f\" AS t WHERE (t.body ->> 'project') = $5::text AND CASE WHEN COALESCE($6::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > CAST($7::text AS TIMESTAMP) END AND CASE WHEN COALESCE($8::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) <= CAST($9::text AS TIMESTAMP) END AND CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > retention.date ORDER BY CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) DESC), postgres_logs AS (SELECT (t.body -> 'timestamp') AS timestamp, (t.body -> 'id') AS id, (t.body -> 'event_message') AS event_message, (t.body -> 'metadata') AS metadata FROM retention, \"_analytics\".\"log_events_0f101398_f940_45c3_a43f_24908c892401\" AS t WHERE (t.body ->> 'project') = $10::text AND CASE WHEN COALESCE($11::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > CAST($12::text AS TIMESTAMP) END AND CASE WHEN COALESCE($13::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) <= CAST($14::text AS TIMESTAMP) END AND CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > retention.date ORDER BY CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) DESC), function_edge_logs AS (SELECT (t.body -> 'timestamp') AS timestamp, (t.body -> 'id') AS id, (t.body -> 'event_message') AS event_message, (t.body -> 'metadata') AS metadata FROM retention, \"_analytics\".\"log_events_392f405e_c4a4_4904_bdf4_256ade01f05d\" AS t WHERE CASE WHEN COALESCE($15::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > CAST($16::text AS TIMESTAMP) END AND CASE WHEN COALESCE($17::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) <= CAST($18::text AS TIMESTAMP) END AND (body #>> '{metadata,project_ref}') = $19::text AND CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > retention.date ORDER BY CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) DESC), function_logs AS (SELECT (t.body -> 'timestamp') AS timestamp, (t.body -> 'id') AS id, (t.body -> 'event_message') AS event_message, (t.body -> 'metadata') AS metadata FROM retention, \"_analytics\".\"log_events_aad2a263_071b_458c_8f1b_794685d28dba\" AS t WHERE (body #>> '{metadata,project_ref}') = $20::text AND CASE WHEN COALESCE($21::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > CAST($22::text AS TIMESTAMP) END AND CASE WHEN COALESCE($23::text, '') = '' THEN true ELSE CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) <= CAST($24::text AS TIMESTAMP) END AND CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS TIMESTAMP) > retention.date ORDER BY CAST((to_timestamp(CAST((t.body ->> 'timestamp') AS BIGINT) / 1000000.0) AT TIME ZONE 'UTC') AS" <> ...}} (logflare 1.14.2) lib/logflare/backends/adaptor/postgres_adaptor.ex:119: Logflare.Backends.Adaptor.PostgresAdaptor.execute_query/2 (logflare 1.14.2) lib/logflare/endpoints.ex:267: Logflare.Endpoints.exec_query_on_backend/4 (logflare 1.14.2) lib/logflare/endpoints/cache.ex:132: Logflare.Endpoints.Cache.handle_call/3 (stdlib 6.1.2) gen_server.erl:2381: :gen_server.try_handle_call/4 (stdlib 6.1.2) gen_server.erl:2410: :gen_server.handle_msg/6 (stdlib 6.1.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3 Last message (from #PID<0.9858.0>): :query 14:50:34.622 [error] Endpoint query exited for an unknown reason