Lists: | pgsql-hackers |
---|
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-18 01:27:25 |
Message-ID: | CAFj8pRCDJ+JZ-qr2HKq3+DoBR3-yiUrqurAE8e=QkXTtAoQkUA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello
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 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
comments, notices?
Regards
Pavel
Attachment | Content-Type | Size |
---|---|---|
ansi-sql-named-parameters.patch | text/x-patch | 9.3 KB |
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 03:54:33 |
Message-ID: | CA+TgmoZMhv44ji_g1ysW5shs61S-JCU94tknfaPphQZwvfy4vg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Sat, Jan 17, 2015 at 8:27 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 07:05:23 |
Message-ID: | CAFj8pRCXbvBeHxY88+OkkxcK8+t_Sd4k96kQqRCABtDtrYXKtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-01-19 4:54 GMT+01:00 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sat, Jan 17, 2015 at 8:27 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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.
>
I have no problem with it. Just I'll try if there are no some unexpected
problem and I'll send a updated patch
Regards
Pavel
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 07:59:37 |
Message-ID: | CAFj8pRAwHqtGB2Hou2OSDsB38-gTekM4_PV32-Sv4GL7irXMOQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-01-19 4:54 GMT+01:00 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sat, Jan 17, 2015 at 8:27 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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
>
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 13:27:20 |
Message-ID: | CA+TgmoaRDf_kDULnHoxE7dCKWoOQx+di2fR-Fb9kkuMMMTt7Fw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jan 19, 2015 at 2:59 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 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 "=>" (
> + ^
Well then the error check is just dead code. Either way, you don't need it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 13:30:11 |
Message-ID: | 20150119133011.GI1663@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Pavel Stehule wrote:
> 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 "=>" (
> + ^
Does it work to use OPERATOR(=>) syntax? I don't think identifier
quoting works for operators.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 16:03:18 |
Message-ID: | CAFj8pRBZOvebbYHKzqv6-h0HFi04N0wf8HekRL5ztg3do2zHgw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-01-19 14:30 GMT+01:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>:
> Pavel Stehule wrote:
>
> > 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 "=>" (
> > + ^
>
> Does it work to use OPERATOR(=>) syntax? I don't think identifier
> quoting works for operators.
>
it doesn't work too
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-01-19 16:14:05 |
Message-ID: | CAFj8pRBKc0c2uKOnuetxLWFRrEbDkcu=11qL7B7bM4uqxrR=Rg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-01-19 14:27 GMT+01:00 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Mon, Jan 19, 2015 at 2:59 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> >> 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 "=>" (
> > + ^
>
> Well then the error check is just dead code. Either way, you don't need
> it.
>
yes, I removed it
Regards
Pavel
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
Attachment | Content-Type | Size |
---|---|---|
ansi-sql-named-parameters-02.patch | text/x-patch | 11.7 KB |
From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-02-19 15:06:48 |
Message-ID: | 54E5FC08.3040909@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 19/01/15 17:14, Pavel Stehule wrote:
>
>
> 2015-01-19 14:27 GMT+01:00 Robert Haas <robertmhaas(at)gmail(dot)com
> <mailto:robertmhaas(at)gmail(dot)com>>:
>
> On Mon, Jan 19, 2015 at 2:59 AM, Pavel Stehule
> <pavel(dot)stehule(at)gmail(dot)com <mailto:pavel(dot)stehule(at)gmail(dot)com>> wrote:
> >> 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 "=>" (
> > + ^
>
> Well then the error check is just dead code. Either way, you don't
> need it.
>
>
> yes, I removed it
>
I am marking this as Ready For Committer, the patch is trivial and works
as expected, there is nothing to be added to it IMHO.
The "=>" operator was deprecated for several years so it should not be
too controversial either.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-02-19 20:15:37 |
Message-ID: | CAFj8pRBrV5FLV5ZTb-p4gzQmE1v_k46S2SDkc=3UN+ipO-103g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-02-19 16:06 GMT+01:00 Petr Jelinek <petr(at)2ndquadrant(dot)com>:
> On 19/01/15 17:14, Pavel Stehule wrote:
>
>>
>>
>> 2015-01-19 14:27 GMT+01:00 Robert Haas <robertmhaas(at)gmail(dot)com
>> <mailto:robertmhaas(at)gmail(dot)com>>:
>>
>> On Mon, Jan 19, 2015 at 2:59 AM, Pavel Stehule
>> <pavel(dot)stehule(at)gmail(dot)com <mailto:pavel(dot)stehule(at)gmail(dot)com>> wrote:
>> >> 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 "=>" (
>> > + ^
>>
>> Well then the error check is just dead code. Either way, you don't
>> need it.
>>
>>
>> yes, I removed it
>>
>>
> I am marking this as Ready For Committer, the patch is trivial and works
> as expected, there is nothing to be added to it IMHO.
>
> The "=>" operator was deprecated for several years so it should not be too
> controversial either.
>
Thank you very much
Pavel
>
>
> --
> Petr Jelinek http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 15:12:40 |
Message-ID: | CA+TgmoZPAuibVJa64-Z--UgfEaMXetG5wA3rSUrAvcuz1+mOzg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Feb 19, 2015 at 3:15 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> I am marking this as Ready For Committer, the patch is trivial and works
>> as expected, there is nothing to be added to it IMHO.
>>
>> The "=>" operator was deprecated for several years so it should not be too
>> controversial either.
Committed with a few documentation tweaks.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 15:50:17 |
Message-ID: | 16457.1426002617@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Feb 19, 2015 at 3:15 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> I am marking this as Ready For Committer, the patch is trivial and works
>> as expected, there is nothing to be added to it IMHO.
>>
>> The "=>" operator was deprecated for several years so it should not be too
>> controversial either.
> Committed with a few documentation tweaks.
Was there any consideration given to whether ruleutils should start
printing NamedArgExprs with "=>"? Or do we think that needs to wait?
regards, tom lane
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 16:01:35 |
Message-ID: | CAFj8pRDqAdDGMB24uRggirRVyG--5VjxXtdaBysSZ-q4S0jVOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-03-10 16:50 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Thu, Feb 19, 2015 at 3:15 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> >> I am marking this as Ready For Committer, the patch is trivial and works
> >> as expected, there is nothing to be added to it IMHO.
> >>
> >> The "=>" operator was deprecated for several years so it should not be
> too
> >> controversial either.
>
> > Committed with a few documentation tweaks.
>
> Was there any consideration given to whether ruleutils should start
> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
>
I didn't think about it? I don't see any reason why it have to use
deprecated syntax.
Regards
Pavel
>
> regards, tom lane
>
From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 16:07:56 |
Message-ID: | 54FF16DC.1040009@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 10/03/15 17:01, Pavel Stehule wrote:
>
>
> 2015-03-10 16:50 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>
> Robert Haas <robertmhaas(at)gmail(dot)com <mailto:robertmhaas(at)gmail(dot)com>>
> writes:
>
> > Committed with a few documentation tweaks.
>
> Was there any consideration given to whether ruleutils should start
> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
>
>
> I didn't think about it? I don't see any reason why it have to use
> deprecated syntax.
>
There is one, loading the output into older version of Postgres. Don't
know if that's important one though.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 16:14:39 |
Message-ID: | CAFj8pRDy7maag26GuCqKONqfv8DqihKDgiXWiAaWwL-B_NtD7Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-03-10 17:07 GMT+01:00 Petr Jelinek <petr(at)2ndquadrant(dot)com>:
> On 10/03/15 17:01, Pavel Stehule wrote:
>
>>
>>
>> 2015-03-10 16:50 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
>> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>>
>> Robert Haas <robertmhaas(at)gmail(dot)com <mailto:robertmhaas(at)gmail(dot)com>>
>> writes:
>>
>> > Committed with a few documentation tweaks.
>>
>> Was there any consideration given to whether ruleutils should start
>> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
>>
>>
>> I didn't think about it? I don't see any reason why it have to use
>> deprecated syntax.
>>
>>
> There is one, loading the output into older version of Postgres. Don't
> know if that's important one though.
I don't think so it is a hard issue. We doesn't support downgrades - and if
somebody needs it, it can fix it with some regexp. We should to use
preferred syntax everywhere - and preferred syntax should be ANSI.
I forgot it :(
Pavel
>
>
> --
> Petr Jelinek http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 16:32:34 |
Message-ID: | CA+TgmoYH8b6tanF-V5_U1-edbvvB8breGPUXWRQj_8rJbP38LA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Mar 10, 2015 at 11:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, Feb 19, 2015 at 3:15 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> I am marking this as Ready For Committer, the patch is trivial and works
>>> as expected, there is nothing to be added to it IMHO.
>>>
>>> The "=>" operator was deprecated for several years so it should not be too
>>> controversial either.
>
>> Committed with a few documentation tweaks.
>
> Was there any consideration given to whether ruleutils should start
> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
I have to admit that I didn't consider that. What do you think? I
guess I'd be tentatively in favor of changing that to match, but I
could be convinced otherwise.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 17:07:37 |
Message-ID: | 29341.1426007257@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Mar 10, 2015 at 11:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Was there any consideration given to whether ruleutils should start
>> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
> I have to admit that I didn't consider that. What do you think? I
> guess I'd be tentatively in favor of changing that to match, but I
> could be convinced otherwise.
Well, as said upthread, the argument for not changing would be that it
would make it easier to dump views and reload them into older PG versions.
I'm not sure how big a consideration that is, or whether it outweighs
possible cross-DBMS compatibility benefits of dumping the more standard
syntax. Presumably we are going to change it at some point; maybe we
should just do it rather than waiting another 5 years.
IOW, I guess I lean mildly towards changing, but I've been beaten up
enough lately about backwards-compatibility worries that I'm not going
to fight for changing this.
regards, tom lane
From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 17:44:49 |
Message-ID: | 2370085.1927956.1426009489488.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Mar 10, 2015 at 11:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Was there any consideration given to whether ruleutils should start
>>> printing NamedArgExprs with "=>"? Or do we think that needs to wait?
>>
>> I have to admit that I didn't consider that. What do you think? I
>> guess I'd be tentatively in favor of changing that to match, but I
>> could be convinced otherwise.
> Presumably we are going to change it at some point; maybe we
> should just do it rather than waiting another 5 years.
+1
It has been deprecated long enough that I don't see the point of waiting.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 18:02:47 |
Message-ID: | 32076.1426010567@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Kevin Grittner <kgrittn(at)ymail(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Presumably we are going to change it at some point; maybe we
>> should just do it rather than waiting another 5 years.
> +1
> It has been deprecated long enough that I don't see the point of waiting.
Uh, just to clarify, this has nothing to do with how long the operator has
been deprecated. The issue is whether pg_dump should dump a function-call
syntax that will not be recognized by any pre-9.5 release, when there is
an alternative that will be recognized back to 9.0.
BTW, I just noticed another place that probably should be changed:
regression=# select foo(x => 1);
ERROR: 42883: function foo(x := integer) does not exist
LINE 1: select foo(x => 1);
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
LOCATION: ParseFuncOrColumn, parse_func.c:516
regards, tom lane
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Kevin Grittner <kgrittn(at)ymail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 18:32:05 |
Message-ID: | CAFj8pRB0T0EX1qNnU8qdsP3S4ALP3TtB6JMxsPgBeqTAfcBS3A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
2015-03-10 19:02 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Kevin Grittner <kgrittn(at)ymail(dot)com> writes:
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Presumably we are going to change it at some point; maybe we
> >> should just do it rather than waiting another 5 years.
>
> > +1
>
> > It has been deprecated long enough that I don't see the point of waiting.
>
> Uh, just to clarify, this has nothing to do with how long the operator has
> been deprecated. The issue is whether pg_dump should dump a function-call
> syntax that will not be recognized by any pre-9.5 release, when there is
> an alternative that will be recognized back to 9.0.
>
> BTW, I just noticed another place that probably should be changed:
>
> regression=# select foo(x => 1);
> ERROR: 42883: function foo(x := integer) does not exist
> LINE 1: select foo(x => 1);
> ^
> HINT: No function matches the given name and argument types. You might
> need to add explicit type casts.
> LOCATION: ParseFuncOrColumn, parse_func.c:516
>
1. funcname_signature_string
2. get_rule_expr
>
> regards, tom lane
>
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-03-10 18:51:30 |
Message-ID: | CA+TgmobCMF7F50+feJpcLR8E_Lyv45AYXBSdiog-NS7VLuFopg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Mar 10, 2015 at 2:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 1. funcname_signature_string
> 2. get_rule_expr
Thanks. Patch attached. I'll commit this if there are no objections.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
named-expr-fixes.patch | binary/octet-stream | 3.6 KB |
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 01:11:39 |
Message-ID: | 20150501011139.GB6342@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, Mar 10, 2015 at 02:51:30PM -0400, Robert Haas wrote:
> On Tue, Mar 10, 2015 at 2:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> > 1. funcname_signature_string
> > 2. get_rule_expr
>
> Thanks. Patch attached. I'll commit this if there are no objections.
Robert, are you going to apply this?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 03:25:53 |
Message-ID: | CAFj8pRDb4RYsyEVnHykxg7e5TXS2JveemfnUKunj0Di-qP4uAg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
It is done
Dne 1.5.2015 3:11 napsal uživatel "Bruce Momjian" <bruce(at)momjian(dot)us>:
> On Tue, Mar 10, 2015 at 02:51:30PM -0400, Robert Haas wrote:
> > On Tue, Mar 10, 2015 at 2:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > > 1. funcname_signature_string
> > > 2. get_rule_expr
> >
> > Thanks. Patch attached. I'll commit this if there are no objections.
>
> Robert, are you going to apply this?
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + Everyone has their own god. +
>
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 13:01:47 |
Message-ID: | 20150501130147.GE6342@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Fri, May 1, 2015 at 05:25:53AM +0200, Pavel Stehule wrote:
> It is done
Uh, I am not sure why you say that as I don't see any commit related to
this. Can you show me the commit?
---------------------------------------------------------------------------
>
> Dne 1.5.2015 3:11 napsal uživatel "Bruce Momjian" <bruce(at)momjian(dot)us>:
>
> On Tue, Mar 10, 2015 at 02:51:30PM -0400, Robert Haas wrote:
> > On Tue, Mar 10, 2015 at 2:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > > 1. funcname_signature_string
> > > 2. get_rule_expr
> >
> > Thanks. Patch attached. I'll commit this if there are no objections.
>
> Robert, are you going to apply this?
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + Everyone has their own god. +
>
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 13:13:28 |
Message-ID: | 55437BF8.6010605@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/05/15 15:01, Bruce Momjian wrote:
> On Fri, May 1, 2015 at 05:25:53AM +0200, Pavel Stehule wrote:
>> It is done
>
> Uh, I am not sure why you say that as I don't see any commit related to
> this. Can you show me the commit?
>
865f14a2d31af23a05bbf2df04c274629c5d5c4d
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 13:17:29 |
Message-ID: | 20150501131729.GG6342@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Fri, May 1, 2015 at 03:13:28PM +0200, Petr Jelinek wrote:
> On 01/05/15 15:01, Bruce Momjian wrote:
> >On Fri, May 1, 2015 at 05:25:53AM +0200, Pavel Stehule wrote:
> >>It is done
> >
> >Uh, I am not sure why you say that as I don't see any commit related to
> >this. Can you show me the commit?
> >
>
> 865f14a2d31af23a05bbf2df04c274629c5d5c4d
But that doesn't touch these:
1. funcname_signature_string
2. get_rule_expr
which is what Robert's later patch did:
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 13:29:07 |
Message-ID: | 55437FA3.4010001@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/05/15 15:17, Bruce Momjian wrote:
> On Fri, May 1, 2015 at 03:13:28PM +0200, Petr Jelinek wrote:
>> On 01/05/15 15:01, Bruce Momjian wrote:
>>> On Fri, May 1, 2015 at 05:25:53AM +0200, Pavel Stehule wrote:
>>>> It is done
>>>
>>> Uh, I am not sure why you say that as I don't see any commit related to
>>> this. Can you show me the commit?
>>>
>>
>> 865f14a2d31af23a05bbf2df04c274629c5d5c4d
>
> But that doesn't touch these:
>
> 1. funcname_signature_string
> 2. get_rule_expr
>
> which is what Robert's later patch did:
>
> http://www.postgresql.org/message-id/CA+TgmobCMF7F50+feJpcLR8E_Lyv45AYXBSdiog-NS7VLuFopg@mail.gmail.com
>
Oh, now I see what you mean, yeah that does not appear to have been
committed.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: disallow operator "=>" and use it for named parameters |
Date: | 2015-05-01 13:38:53 |
Message-ID: | CA+TgmobA9RaQ-AwMpMsHMMC6AEOvFrym9GCx+9U8RWeUHzk1LQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Apr 30, 2015 at 9:11 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Tue, Mar 10, 2015 at 02:51:30PM -0400, Robert Haas wrote:
>> On Tue, Mar 10, 2015 at 2:32 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> > 1. funcname_signature_string
>> > 2. get_rule_expr
>>
>> Thanks. Patch attached. I'll commit this if there are no objections.
>
> Robert, are you going to apply this?
Good catch. I had totally forgotten about this. Committed now, thanks.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company