Re: Add more regression tests for CREATE OPERATOR

Lists: pgsql-hackers
From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Add more regression tests for CREATE OPERATOR
Date: 2013-05-22 22:34:48
Message-ID: CAEP4nAy36LQ=fwCGGX8e5c44N0FNEyh10rCkigs8-4jexz2xGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Please find attached a patch to take code-coverage of CREATE OPERATOR
(src/backend/commands/operatorcmds.c) from 56% to 91%.

Any and all feedback is welcome.
--
Robins Tharakan

Attachment Content-Type Size
regress_createoperator.patch application/octet-stream 9.6 KB

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Robins Tharakan <tharakan(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-17 10:19:40
Message-ID: CAFjNrYtJSwhM-GFmP-+3nfDOmUG84oiBJDXDH-MQRQD4XHvjkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 23 May 2013 00:34, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:

> Hi,
>
> Please find attached a patch to take code-coverage of CREATE OPERATOR
> (src/backend/commands/operatorcmds.c) from 56% to 91%.
>
> Any and all feedback is welcome.
> --
> Robins Tharakan
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
Hi,
there is one commented out test. I think it should be run, or deleted.
There is no use of commented sql code which is not run.

What do you think?

regards,
Szymon


From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-25 09:12:56
Message-ID: CAEP4nAxvEurL6Wt0LsgNjowDKVn0yedzPJCwRxrU=7ufAhXCiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Thanks a ton Szymon (for a reminder on this one).

As a coincidental turn of events, I have had to travel half way across the
world and am without my personal laptop (without a linux distro etc.) and
just recovering from a jet-lag now.

I'll try to install a VM on a make-shift laptop and get something going to
respond as soon as is possible.

Thanks
--
Robins Tharakan

--
Robins Tharakan

On 17 June 2013 05:19, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:

> On 23 May 2013 00:34, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
>
>> Hi,
>>
>> Please find attached a patch to take code-coverage of CREATE OPERATOR
>> (src/backend/commands/operatorcmds.c) from 56% to 91%.
>>
>> Any and all feedback is welcome.
>> --
>> Robins Tharakan
>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>>
>>
> Hi,
> there is one commented out test. I think it should be run, or deleted.
> There is no use of commented sql code which is not run.
>
> What do you think?
>
> regards,
> Szymon
>


From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 07:26:33
Message-ID: CAEP4nAxmBPSo6Ca1B8VUptUeq+cSjRCrnB52kwScJds86NpH8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Szymon,

The commented out test that you're referring to, is an existing test (not
that I added or commented). I was going to remove but interestingly its
testing a part of code where (prima-facie) it should fail, but it passes
(probably why it was disabled in the first place)
!

So technically I hope this regression patch I submitted could go through
since this feedback isn't towards that patch, but in my part I am quite
intrigued about this test (and how it passes) and probably I'd get back on
this thread about this particular commented out test in question, as time
permits.

--
Robins Tharakan

On 25 June 2013 04:12, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:

> Thanks a ton Szymon (for a reminder on this one).
>
> As a coincidental turn of events, I have had to travel half way across the
> world and am without my personal laptop (without a linux distro etc.) and
> just recovering from a jet-lag now.
>
> I'll try to install a VM on a make-shift laptop and get something going to
> respond as soon as is possible.
>
> Thanks
> --
> Robins Tharakan
>
> --
> Robins Tharakan
>
>
> On 17 June 2013 05:19, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
>
>> On 23 May 2013 00:34, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
>>
>>> Hi,
>>>
>>> Please find attached a patch to take code-coverage of CREATE OPERATOR
>>> (src/backend/commands/operatorcmds.c) from 56% to 91%.
>>>
>>> Any and all feedback is welcome.
>>> --
>>> Robins Tharakan
>>>
>>>
>>> --
>>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-hackers
>>>
>>>
>> Hi,
>> there is one commented out test. I think it should be run, or deleted.
>> There is no use of commented sql code which is not run.
>>
>> What do you think?
>>
>> regards,
>> Szymon
>>
>
>


From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Robins Tharakan <tharakan(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 07:29:38
Message-ID: CAFjNrYto=0tQZaW_vj6-V1KodL2Z1CjkLAXwAnATQxebPAsAoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

OK, so I think this patch can be committed, I will change the status.

thanks,
Szymon

On 26 June 2013 09:26, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:

> Hi Szymon,
>
> The commented out test that you're referring to, is an existing test (not
> that I added or commented). I was going to remove but interestingly its
> testing a part of code where (prima-facie) it should fail, but it passes
> (probably why it was disabled in the first place)
> !
>
>
> So technically I hope this regression patch I submitted could go through
> since this feedback isn't towards that patch, but in my part I am quite
> intrigued about this test (and how it passes) and probably I'd get back on
> this thread about this particular commented out test in question, as time
> permits.
>
> --
> Robins Tharakan
>
>
> On 25 June 2013 04:12, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
>
>> Thanks a ton Szymon (for a reminder on this one).
>>
>> As a coincidental turn of events, I have had to travel half way across
>> the world and am without my personal laptop (without a linux distro etc.)
>> and just recovering from a jet-lag now.
>>
>> I'll try to install a VM on a make-shift laptop and get something going
>> to respond as soon as is possible.
>>
>> Thanks
>> --
>> Robins Tharakan
>>
>> --
>> Robins Tharakan
>>
>>
>> On 17 June 2013 05:19, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
>>
>>> On 23 May 2013 00:34, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Please find attached a patch to take code-coverage of CREATE OPERATOR
>>>> (src/backend/commands/operatorcmds.c) from 56% to 91%.
>>>>
>>>> Any and all feedback is welcome.
>>>> --
>>>> Robins Tharakan
>>>>
>>>>
>>>> --
>>>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>>>> To make changes to your subscription:
>>>> http://www.postgresql.org/mailpref/pgsql-hackers
>>>>
>>>>
>>> Hi,
>>> there is one commented out test. I think it should be run, or deleted.
>>> There is no use of commented sql code which is not run.
>>>
>>> What do you think?
>>>
>>> regards,
>>> Szymon
>>>
>>
>>
>


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Szymon Guz <mabewlun(at)gmail(dot)com>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 18:55:11
Message-ID: 51CB390F.80705@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06/26/2013 12:29 AM, Szymon Guz wrote:
> OK, so I think this patch can be committed, I will change the status.

Can we have a full review before you mark it "ready for committer"? How
did you test it? What kinds of review have you done?

The committer can't know whether it's ready or not if he doesn't have a
full report from you.

Thanks!

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 18:57:45
Message-ID: CAFjNrYtpLV8kA5g5kwSrQV6N+-STJYZJK2zX-zgm4+D2dxpP9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26 June 2013 20:55, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> On 06/26/2013 12:29 AM, Szymon Guz wrote:
> > OK, so I think this patch can be committed, I will change the status.
>
> Can we have a full review before you mark it "ready for committer"? How
> did you test it? What kinds of review have you done?
>
> The committer can't know whether it's ready or not if he doesn't have a
> full report from you.
>
> Thanks!
>
>
Hi Josh,
I will add more detailed descriptions to all patches I set as read for
committer.

Szymon


From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 19:05:10
Message-ID: CAFjNrYsCKt-weLECDPt4KSk52qQkjEFDD67-5VLnfPeUpEtnUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26 June 2013 20:57, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:

> On 26 June 2013 20:55, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>
>> On 06/26/2013 12:29 AM, Szymon Guz wrote:
>> > OK, so I think this patch can be committed, I will change the status.
>>
>> Can we have a full review before you mark it "ready for committer"? How
>> did you test it? What kinds of review have you done?
>>
>> The committer can't know whether it's ready or not if he doesn't have a
>> full report from you.
>>
>> Thanks!
>>
>>
>
>
Hi Josh,
so I've got a couple of questions.

Is it enough to provide the description in the commitfest app, or is that
better to send an email and provide link in commitfest?

This is a patch only with regression tests, is that enough to write
something like: "This patch applies cleanly on trunk code. All tests pass,
the test coverage increses as provided."? Or do you expect some more info?

thanks,
Szymon


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, Szymon Guz <mabewlun(at)gmail(dot)com>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 19:10:36
Message-ID: 51CB3CAC.1050003@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


> Is it enough to provide the description in the commitfest app, or is that
> better to send an email and provide link in commitfest?

Better to do it here, on the list.

> This is a patch only with regression tests, is that enough to write
> something like: "This patch applies cleanly on trunk code. All tests pass,
> the test coverage increses as provided."? Or do you expect some more info?

Yes, mainly:

a) does it test what it purports to test?

b) do the tests pass on your machine?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-26 19:52:15
Message-ID: CAFjNrYuj5T5KUJ_cTdSsb9241gc7MeKXbRKBSVrSR8f3aKkidQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26 June 2013 21:10, Josh Berkus <josh(at)agliodbs(dot)com> wrote:

>
> > Is it enough to provide the description in the commitfest app, or is that
> > better to send an email and provide link in commitfest?
>
> Better to do it here, on the list.
>
> > This is a patch only with regression tests, is that enough to write
> > something like: "This patch applies cleanly on trunk code. All tests
> pass,
> > the test coverage increses as provided."? Or do you expect some more
> info?
>
> Yes, mainly:
>
> a) does it test what it purports to test?
>
> b) do the tests pass on your machine?
>
>
Done, could you confirm that it is OK now?
I've also checked all the patches on the newest trunk.

thanks,
Szymon


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: Robins Tharakan <tharakan(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-27 14:00:04
Message-ID: CA+TgmoamWT7q+NX98yresL749CnU=aAOf2u0P6O3X0EMr-542Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jun 26, 2013 at 3:29 AM, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
> OK, so I think this patch can be committed, I will change the status.

We have a convention that roles created by the regression tests needs
to have "regress" or something of the sort in the name, and that they
need to be dropped by the regression tests. The idea is that if
someone runs "make installcheck" against an installed server, it
should pass - even if you run it twice in succession. And also, it
shouldn't be likely to try to create (and then drop!) a role name that
already exists.

Setting this to "Waiting on Author".

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


From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Szymon Guz <mabewlun(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-27 14:12:10
Message-ID: CAEP4nAzsGK4ba1y8FTR42HkEmbdbaCx_JLNp6AiChZsrCkN-Fw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sure Robert.
I 'll update the tests and get back.

Two questions, while we're at it:

1. Any other conventions (for naming)?
2. Should I assume that all database objects that get created, need to be
dropped explicitly? Or is this point specifically about ROLES?

--
Robins Tharakan

On 27 June 2013 09:00, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Wed, Jun 26, 2013 at 3:29 AM, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
> > OK, so I think this patch can be committed, I will change the status.
>
> We have a convention that roles created by the regression tests needs
> to have "regress" or something of the sort in the name, and that they
> need to be dropped by the regression tests. The idea is that if
> someone runs "make installcheck" against an installed server, it
> should pass - even if you run it twice in succession. And also, it
> shouldn't be likely to try to create (and then drop!) a role name that
> already exists.
>
> Setting this to "Waiting on Author".
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robins Tharakan <tharakan(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Szymon Guz <mabewlun(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-27 14:52:20
Message-ID: 21262.1372344740@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robins Tharakan <tharakan(at)gmail(dot)com> writes:
> 2. Should I assume that all database objects that get created, need to be
> dropped explicitly? Or is this point specifically about ROLES?

It's about any global objects (that wouldn't get dropped by dropping the
regression database). As far as local objects go, there are benefits to
leaving them around, particularly if they present interesting test cases
for pg_dump/pg_restore.

regards, tom lane


From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Szymon Guz <mabewlun(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-06-29 01:34:10
Message-ID: CAEP4nAw1CajZDs+nnZCA2F=UybHaunJbO-GOGUPhqyzpVkDtXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 27 June 2013 09:00, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Wed, Jun 26, 2013 at 3:29 AM, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
> > OK, so I think this patch can be committed, I will change the status.
>
> We have a convention that roles created by the regression tests needs
> to have "regress" or something of the sort in the name, and that they
> need to be dropped by the regression tests. The idea is that if
> someone runs "make installcheck" against an installed server, it
> should pass - even if you run it twice in succession. And also, it
> shouldn't be likely to try to create (and then drop!) a role name that
> already exists.
>
> Setting this to "Waiting on Author".
>
> Hi Robert,

Attached is an updated patch that prepends 'regress' before role names.

As for dropping ROLEs is concerned, all the roles created in the previous
patch were within transactions. So didn't have to explicitly drop any ROLEs
at the end of the script.
--
Robins Tharakan

Attachment Content-Type Size
regress_createoperator_v2.patch application/octet-stream 9.6 KB

From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add more regression tests for CREATE OPERATOR
Date: 2013-07-01 21:52:37
Message-ID: CAEP4nAzjOj_28F=95NCjm-uZ2YaR1ffDodPMhVbGAOFwU6wdZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 26 June 2013 02:26, Robins Tharakan <tharakan(at)gmail(dot)com> wrote:

> So technically I hope this regression patch I submitted could go through
> since this feedback isn't towards that patch, but in my part I am quite
> intrigued about this test (and how it passes) and probably I'd get back on
> this thread about this particular commented out test in question, as time
> permits.
>
>
Attached is an updated (cumulative) patch, that takes care of the issue
mentioned above and tests two more cases that were skipped earlier.

--
Robins Tharakan

Attachment Content-Type Size
regress_createoperator_v3.txt text/plain 9.8 KB