Feature Request: Report additionally error value - Mailing list pgsql-hackers

From Eugen Konkov
Subject Feature Request: Report additionally error value
Date
Msg-id 1432862271.20201129005758@yandex.ru
Whole thread Raw
Responses Re: Feature Request: Report additionally error value  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Hi all.

I often fall into error like this:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR:  timestamp out of range
CONTEXT:  SQL function "accounting_ready" statement 1 [for Statement "SELECT COUNT( * ) FROM (WITH
target_date AS ( SELECT ?::timestamptz ),
target_order as (
  SELECT
    invoice_range as bill_range,
    o.*
  FROM ( SELECT * FROM "order_bt" WHERE sys_period @> sys_time() ) o
  LEFT JOIN period prd on prd.id = o.period_id
  LEFT JOIN accounting_ready(
.....
other 200 lines of query

Would be nice if here also will be reported error value.
It will shed more light on what is comming wrong

Also would be useful if PG point at query where this bad value was calculated or occur.

It this possible?

Thank you.


--
Best regards,
Eugen Konkov

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Failed assertion during partition pruning
Next
From: Robert Haas
Date:
Subject: Re: parallel distinct union and aggregate support patch