Re: pg_generate_sequence and info_schema patch (Was: SELECT Question) - Mailing list pgsql-patches

From Tom Lane
Subject Re: pg_generate_sequence and info_schema patch (Was: SELECT Question)
Date
Msg-id 6838.1075875704@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_generate_sequence and info_schema patch (Was: SELECT  (Joe Conway <mail@joeconway.com>)
Responses Re: pg_generate_sequence and info_schema patch (Was: SELECT  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> A first shot at documentation for generate_series() is available here in
> html form:
> http://www.joeconway.com/functions-srf.html
> Feedback welcome.

This bit seems unnecessarily vague:

   Depending on the requested combination of start, stop, and step, it is
   possible to return zero rows.

I think you can provide a precise specification without losing
simplicity of explanation.  Maybe something like

   When step is positive, zero rows are returned if start > stop.
   Conversely, when step is negative, zero rows are returned if
   start < stop.  It is an error for step to be zero.

... and then carry on with the examples, which seem fine (although
the one showing the error for step=0 might be thought redundant
with the text).

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: pg_generate_sequence and info_schema patch (Was: SELECT
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: pg_generate_sequence and info_schema patch (Was: SELECT