Re: pg_generate_sequence and info_schema patch (Was: SE

Поиск
Список
Период
Сортировка
От Claudio Natoli
Тема Re: pg_generate_sequence and info_schema patch (Was: SE
Дата
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F2B2@harris.memetrics.local
обсуждение исходный текст
Список pgsql-patches
Tom Lane wrote:
> If you want to allow the 3-parameter form to specify a negative step
> size, that's fine.  But don't use a heuristic to guess the intended
> step direction.

Have to agree. Ever used MatLab? They have a fairly intuitive approach:

1:5 => [1 2 3 4]

1:2:5 => [1 3 5]

5:1 => empty matrix

5:-1:1 => [5 4 3 2 1]

Basically, step size is assumed to be +1, unless provided (in their syntax,
as the second argument when 3 arguments are given). Empty ranges produce an
emty result.

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_generate_sequence and info_schema patch (Was: SELECT Question)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: C locale sort in src/tools/make_ctags