Re: proposal: disallow operator "=>" and use it for named parameters

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: disallow operator "=>" and use it for named parameters
Дата
Msg-id CAFj8pRAwHqtGB2Hou2OSDsB38-gTekM4_PV32-Sv4GL7irXMOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: disallow operator "=>" and use it for named parameters  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: proposal: disallow operator "=>" and use it for named parameters  (Robert Haas <robertmhaas@gmail.com>)
Re: proposal: disallow operator "=>" and use it for named parameters  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers


2015-01-19 4:54 GMT+01:00 Robert Haas <robertmhaas@gmail.com>:
On Sat, Jan 17, 2015 at 8:27 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> two years a operator "=>" is marked as deprecated (from PostgreSQL 9.2).
>
> Isn't time to use it for named parameters now (for PostgreSQL 9.5) ?

I'm cool with that.  It's possible that there are installations out
there that still have => operators installed, but every
still-supported release warns you not to do that, and the hstore
change exists in three released versions.  Anyway, no amount of
waiting will eliminate the hazard completely.

> I am sending a implementation where syntax based on "=>" symbol is second
> (but preferred) variant of ":=" syntax .. syntax ":=" will be supported
> still.
>
> Here is a patch

I think you should just remove the WARNING, not change it to an error.
If somebody wants to quote the operator name to be able to continue
using it, I think that's OK.

It looks so quoting doesn't help here

+ CREATE OPERATOR "=>" (
+    leftarg = int8,<--><------>-- right unary
+    procedure = numeric_fac
+ );
+ ERROR:  syntax error at or near "("
+ LINE 1: CREATE OPERATOR "=>" (
+                              ^

Regards

Pavel
 

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel Seq Scan
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: EvalPlanQual behaves oddly for FDW queries involving system columns