Re: pg_generate_sequence and info_schema patch (Was: SE - Mailing list pgsql-patches

From Claudio Natoli
Subject Re: pg_generate_sequence and info_schema patch (Was: SE
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F2B2@harris.memetrics.local
Whole thread Raw
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_generate_sequence and info_schema patch (Was: SELECT Question)
Next
From: Bruce Momjian
Date:
Subject: Re: C locale sort in src/tools/make_ctags