Re: libpq error message refactoring

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq error message refactoring
Date: 2022-10-12 07:35:49
Message-ID: e0d98802-143d-7294-a751-9c19faa15861@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.08.22 16:34, Peter Eisentraut wrote:
> 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.

I have completed this patch, taking into account the fixes discussed in
this thread.

I have split the patch in two, for review: The first is just the new
APIs, the second are the changes that apply the API everywhere.

Attachment Content-Type Size
v2-0001-libpq-error-message-refactoring.patch text/plain 6.4 KB
v2-0002-libpq-error-message-refactoring-part-2.patch text/plain 127.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2022-10-12 07:36:15 Re: generic plans and "initial" pruning
Previous Message Alvaro Herrera 2022-10-12 07:34:39 Re: Move backup-related code to xlogbackup.c/.h