Re: Missing errcode() in ereport - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Missing errcode() in ereport
Date
Msg-id 24281.1585540670@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing errcode() in ereport  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> I'd have found it helpful to just have the docs explain clearly how it
> works by chaining the comma operator using functions with ignored return
> values.

Want to write some text?

> That would also help people understand how they can make parts of an
> ereport conditional, e.g. only set errdetail() if there additional info is
> currently available W/O duplicating the rest of the ereport .

There are examples of that in the tree, of course, but maybe an
example in the docs wouldn't be bad either.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Missing errcode() in ereport
Next
From: Andres Freund
Date:
Subject: Re: Missing errcode() in ereport