fori stmt with by keyword was:(Re: [HACKERS] for statement, adding a STEP clause?)

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема fori stmt with by keyword was:(Re: [HACKERS] for statement, adding a STEP clause?)
Дата
Msg-id c2d9e70e0604301324i6f78eafdt2f9a0908bec3af18@mail.gmail.com
обсуждение исходный текст
Ответы Re: fori stmt with by keyword was:(Re: [HACKERS] for statement, adding a STEP clause?)  ("Jaime Casanova" <systemguards@gmail.com>)
Список pgsql-patches
On 4/29/06, Andrew Dunstan <andrew@dunslane.net> wrote:
> Tom Lane wrote:
>
> >"Jaime Casanova" <systemguards@gmail.com> writes:
> >
> >
> >>there is a chance to add a STEP clause to the FOR statement in plpgsql?
> >>
> >>
> >
> >This is not free: it'd require making STEP a reserved word (at least
> >within plpgsql) which is contrary to spec.  I think you need to make
> >a pretty good case why the value of the feature outweighs breaking
> >applications that have perfectly-legally used "step" as an identifier.
> >
> >
>
> This isn't available in PL/SQL, is it? That doesn't mean we shouldn't do it, of course, but it might lessen any
perceivedimperative. 
>
> Maybe using BY instad of STEP as the keyword would make it easier, since its occurrence in SQL makes it less likely
tobe used as a variable. 
>
> cheers
>
> andrew
>
>

Hi,

i make a little patch using BY instead of STEP per Tom's complaint and
Andrew's suggestion.

the patch is not ready yet because i can't figure out how to make the
BY optional and that is mandatory because backward compatibility...

the problem is how to manage it in gram.y

perhaps someone with more expertise in gram.y can make suggestions?
also, you can review the patch and say if it will be added if i can
solve the optional BY problem... then i can start working in fixing
the docs


--
regards,
Jaime Casanova

"What they (MySQL) lose in usability, they gain back in benchmarks, and that's
all that matters: getting the wrong answer really fast."
                           Randal L. Schwartz

Вложения

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

Предыдущее
От: "Sven Suursoho"
Дата:
Сообщение: Re: plpython improvements
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch for %Allow per-database permissions to be set via