public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Gurjeet Singh <[email protected]>
Cc: Postgres Hackers <[email protected]>
Subject: Re: Named Operators
Date: Wed, 08 Feb 2023 11:58:59 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CABwTF4VVuacLV+coERacdDxUXg5tDMHZxvgH5+ek0UZvoq386g@mail.gmail.com>
	<CAEze2WjeYjcf-bm_4gggK7PQ+9fQQ6=hzGeYxTRY9r+D-BPt8g@mail.gmail.com>
	<CABwTF4Uh3FUK6_9mj_aszciLt-CU0eYKiCdaL1nXShjxaHhbqQ@mail.gmail.com>
	<CAEze2Wi37EvNBk4a-oj_Gv4o74X6cOcqP8XSGGYMTnZOn=hsew@mail.gmail.com>
	<[email protected]>
	<[email protected]>

I wrote:
> This approach does have a couple of shortcomings:

> * You still have to invent an operator name, even if you never
> plan to use it in queries.  This is just cosmetic though.
> It's not going to matter if the operator name is long or looks like
> line noise, if you only need to use it a few times in setup DDL.

Oh, one other thought is that we could address that complaint
by allowing OPERATOR(identifier), so that your DDL could use
a meaningful name for the operator.  I see that we don't
actually support OPERATOR() right now in CREATE OPERATOR or
ALTER OPERATOR:

regression=# create operator operator(+) (function = foo);
ERROR:  syntax error at or near "("
LINE 1: create operator operator(+) (function = foo);
                                ^

but I doubt that'd be hard to fix.

			regards, tom lane






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Named Operators
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox