Tom Lane wrote:
Although this is quite reasonable for queries submitted by
user-written C functions, I'm worried that plpgsql programmers will
be confused because they've never heard of SPI. I toyed with saying
"SQL query" instead, but that seems pretty nearly content-free ... it
doesn't distingui
I've been fooling with adding a report of the executing query to the
CONTEXT stack when an error happens within a query submitted by a
plpgsql function. Since plpgsql submits all its queries through SPI,
the most convenient place to do this is in spi.c, and so the behavior
will also apply to queri