Re: Named Operators

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Named Operators
Дата
Msg-id CAKFQuwZcsyjN5W1wJRU3yOMhn=RvWZVMAQ3-d6L2eLWZiBAr7w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Named Operators  (Gurjeet Singh <gurjeet@singh.im>)
Список pgsql-hackers
On Thu, Jan 12, 2023 at 3:59 AM Gurjeet Singh <gurjeet@singh.im> wrote:
On Thu, Jan 12, 2023 at 1:49 AM Matthias van de Meent
<boekewurm+postgres@gmail.com> wrote:

> I'm -1 on the chosen syntax; :name: shadows common variable
> substitution patterns including those of psql.

I'll consider using one of the other special characters. Do you have
any suggestions?


The R language uses %...% to denote custom operators.

That would be a bit annoying for dynamic SQL using format though...

Do we have to choose?  There are 15 allowed characters for operator names presently (aside from + and -), could we define the rule that an operator name can contain any sequence of alphabetic+underscore+space? characters so long as the first and last symbol of the operator name is one of those 15 characters?

Another appealing option would be the non-matching but complementary pair <...> (I'd consider removing these from the 15 choices in we go that route)

SELECT 1 <add> 2;

I would probably avoid requiring back-ticks given their usage as identifier quoting in other systems - probably remove it from the 15 choices if we go that route.

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Named Operators
Следующее
От: Dag Lem
Дата:
Сообщение: Re: daitch_mokotoff module