Re: Deprecating postfix and factorial operators in PostgreSQL 13

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, John Naylor <john(dot)naylor(at)2ndquadrant(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: Deprecating postfix and factorial operators in PostgreSQL 13
Date: 2020-08-30 16:55:19
Message-ID: 0EAB2286-69A8-4CB0-91E0-16EBB3749812@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Aug 28, 2020, at 8:56 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> So, in this version, there are six copies of the deprecation notice
>> John wrote, rather than just one. Maybe we need more than one, but I
>> doubt we need six. I don't think the CREATE OPERATOR documentation
>> needs to mention this both when first introducing the concept and then
>> again when defining right_type; the former seems sufficient. I don't
>> think xoper.sgml needs these changes either; they interrupt the flow
>> of the narrative and I don't think this is where anyone would look for
>> a deprecation notice. I would also argue for dropping the mentions in
>> the docs for ALTER OPERATOR FAMILY and CREATE OPERATOR CLASS, although
>> those seem less clear-cut. Really, CREATE OPERATOR where John had it
>> originally seems like the right place.
>
> Yeah, I agree that there are way too many copies here. CREATE OPERATOR
> seems sufficient. It also seems like we should just rewrite the typeconv
> and drop_operator examples to use some other operator. We'll have
> to do that eventually anyway, so why not now, instead of visiting those
> places twice?

John's deprecation language now only appears in the create operator documentation.

The first typeconv example was based on the (int8 !) operator. I chose to replace it with and example based on the (jsonb ? text) operator, as the two operators have a relevant similarity. Both of them are singletons, with only one interpretation in the standard catalogs. In both cases, the scanner cannot know the types of the undecorated arguments and assigns default types (integer and unknown, respectively), which get resolved later to match the only types accepted by the operator ('int8' for !, and 'jsonb,text' for ?).

The drop operator example has been left, though altered to include the adjective "deprecated". Robert mentions that the entire example could simply be dropped now, and I agree with that, but it also makes sense to me to drop the example in 14, when the operation it describes is also dropped. If the committer who picks this up wants to drop that example now, that's fine, too.

Attachment Content-Type Size
v3-0001-Adding-deprecation-notices.patch application/octet-stream 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-08-30 16:59:57 Re: list of extended statistics on psql
Previous Message Tomas Vondra 2020-08-30 16:48:18 Re: list of extended statistics on psql