show_param_values_on_bind_error_1-master.diff
text/x-patch
Filename: show_param_values_on_bind_error_1-master.diff
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/backend/tcop/postgres.c | 18 | 0 |
*** a/src/backend/tcop/postgres.c
--- b/src/backend/tcop/postgres.c
***************
*** 1715,1726 **** exec_bind_message(StringInfo input_message)
pq_getmsgend(input_message);
! /*
! * Obtain a plan from the CachedPlanSource. Any cruft from (re)planning
! * will be generated in MessageContext. The plan refcount will be
! * assigned to the Portal, so it will be released at portal destruction.
! */
! cplan = GetCachedPlan(psrc, params, false);
/*
* Now we can define the portal.
--- 1715,1738 ----
pq_getmsgend(input_message);
! PG_TRY();
! {
! /*
! * Obtain a plan from the CachedPlanSource. Any cruft from (re)planning
! * will be generated in MessageContext. The plan refcount will be
! * assigned to the Portal, so it will be released at portal destruction.
! */
!
! cplan = GetCachedPlan(psrc, params, false);
! }
! PG_CATCH();
! {
! if (check_log_statement(portal->stmts) || check_log_duration(msec_str, false) == 2)
! errdetail_params(params);
!
! PG_RE_THROW();
! }
! PG_END_TRY();
/*
* Now we can define the portal.