Re: BUG #18829: RAISE NOTICE appends 's' to string in PostgreSQL 17.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: armandnortjee(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18829: RAISE NOTICE appends 's' to string in PostgreSQL 17.2
Date: 2025-03-02 16:09:47
Message-ID: 3189041.1740931787@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> In PostgreSQL 17.2, when using the RAISE NOTICE command with a string
> variable, the output incorrectly appends an extra 's' to the string value.

The substitution marker in plpgsql RAISE strings is just "%", not
"%s" as it is in C, so this output is expected. That wasn't the best
design perhaps, but it's impossible to change it now.

> This issue does not occur when running the same code in earlier PostgreSQL
> versions (e.g., PostgreSQL 16).

You are quite mistaken about that. It's been like this since the
beginning of plpgsql.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Dunstan 2025-03-02 16:10:07 Re: BUG #18829: RAISE NOTICE appends 's' to string in PostgreSQL 17.2
Previous Message PG Bug reporting form 2025-03-02 14:18:55 BUG #18829: RAISE NOTICE appends 's' to string in PostgreSQL 17.2