libpq error message refactoring

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: libpq error message refactoring
Date: 2022-08-25 14:34:26
Message-ID: 7c0232ef-7b44-68db-599d-b327d0640a77@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

libpq now contains a mix of error message strings that end with newlines
and don't end with newlines, due to some newer code paths with new ways
of passing errors around. This has now gotten me confused a few too
many times both during development and translation. So I looked into
whether we can unify this, similar to how we have done elsewhere (e.g.,
pg_upgrade). I came up with the attached patch. It's not complete, but
it shows the idea and it looks like a nice simplification to me.
Thoughts on this approach?

Attachment Content-Type Size
v1-0001-WIP-libpq_append_error.patch text/plain 40.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-08-25 14:35:20 Re: pg_basebackup: add test about zstd compress option
Previous Message Robert Haas 2022-08-25 14:32:24 Re: Letter case of "admin option"