Re: Review handling of MOVE and FETCH (ToDo)

Lists: pgsql-hackers
From: John Naylor <jcnaylor(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review handling of MOVE and FETCH (ToDo)
Date: 2009-09-28 17:44:58
Message-ID: 4d191a530909281044n418e885cvb219c7ab3e0013a4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

(resent to -hackers)

I just applied and tested the new patch. Everything works great.

The only thing I would change now is some of the comments.

1). On line 289, one of the regression test comments got copied:

+   move forward in c;                --should be at '5'

change to:

+   move forward in c;                --should be at '1'

2). Lines 79/80:

+
 errmsg("statement FETCH returns more rows."),
+
 errhint("Multirows fetch are not allowed in PL/pgSQL.")));

This might sound better as "statement FETCH returns multiple rows.",
and "Multirow FETCH is not allowed in PL/pgSQL."

Everything else looks good to me.
John

> Hi Selena and John,
>
> Pavel's latest patch seems to address all the issues you raised in
> your initial review.  Do you have any comments on this new revision?
> If you're happy that your issues have been resolved, please mark the
> patch as Ready for Committer.
>
> Cheers,
> BJ
>


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: John Naylor <jcnaylor(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review handling of MOVE and FETCH (ToDo)
Date: 2009-09-30 07:18:07
Message-ID: 1254295087.10072.0.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2009-09-28 at 10:44 -0700, John Naylor wrote:
> +
> errmsg("statement FETCH returns more rows."),
> +
> errhint("Multirows fetch are not allowed in PL/pgSQL.")));
>
> This might sound better as "statement FETCH returns multiple rows.",

errmsg should be without period.

> and "Multirow FETCH is not allowed in PL/pgSQL."

That might better be errdetail.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: John Naylor <jcnaylor(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review handling of MOVE and FETCH (ToDo)
Date: 2009-09-30 13:51:47
Message-ID: 13930.1254318707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> On Mon, 2009-09-28 at 10:44 -0700, John Naylor wrote:
>> + errmsg("statement FETCH returns more rows."),
>> + errhint("Multirows fetch are not allowed in PL/pgSQL.")));
>>
>> This might sound better as "statement FETCH returns multiple rows.",

> errmsg should be without period.

>> and "Multirow FETCH is not allowed in PL/pgSQL."

> That might better be errdetail.

It got committed like this:

ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("FETCH statement cannot return multiple rows")));

I didn't think the HINT was adding anything useful ...

regards, tom lane