[[deprecated("don't call this, call that")]] - Mailing list pgsql-hackers

From Thomas Munro
Subject [[deprecated("don't call this, call that")]]
Date
Msg-id CA+hUKGK2zuRevnNzCpVzLA7ieHnJoYPnDvgtWRcB4pVnOzchhQ@mail.gmail.com
Whole thread
Responses Re: [[deprecated("don't call this, call that")]]
Re: [[deprecated("don't call this, call that")]]
List pgsql-hackers
Hi,

While working on 1e7fe06c, I wished I could make functions generate
compiler warnings:

pg_attribute_deprecated("use pg_mblen_{cstr,range,with_len,unbounded} instead")
extern int     pg_mblen(const char *mbstr);

That'd avoid accidental reintroduction, and also get extension
maintainers' attention. $SUBJECT is C23/C++14's syntax, but you've
long been able to do that with in __attribute__ or __declspec for the
usual suspects so I looked into which compiler versions introduced
that and came up with the attached.

The idea would be to back-patch the deprecation warnings, and delete
the functions in, I guess now, v20.  Then the deprecation notice
facility would always be there for next time we need it.

Attachment

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Add missing period to HINT messages
Next
From: shveta malik
Date:
Subject: Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication