Re: temporal version of generate_series()

Lists: pgsql-patches
From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: temporal version of generate_series()
Date: 2008-04-23 10:45:32
Message-ID: e08cc0400804230345t6183074an5c18d613e9e3076b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

I found a TODO item "Add temporal versions of generate_series()" and
wrote patch for generate_series(timestamp, timestamp, interval).

I just copied it from int4.c to timestamp.c and fit the data types in
timestamp and interval. I wonder if we need ones for timestamptz and
time?? If so, the implementation will be so similar that some kind of
generic approach should make things smart. For example, find add '+'
operator function from syscache and take anyelement as arguments.

# This is my first time to send a patch. If I did something wrong, I
appreciate your pointing me out.

Hitoshi Harada

Attachment Content-Type Size
generate_series_timestamp.20080423.patch.gz application/x-gzip 1.7 KB

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "H(dot)Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-04-23 13:57:29
Message-ID: 20080423135729.GH4768@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

H.Harada escribió:

> # This is my first time to send a patch. If I did something wrong, I
> appreciate your pointing me out.

Brace positioning is off w.r.t. our conventions -- please fix that and
resubmit.

I have added this patch to the May commitfest.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-04-24 01:30:24
Message-ID: e08cc0400804231830w543d3f21k79611102cca8d58d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> H.Harada escribió:
>
>
> > # This is my first time to send a patch. If I did something wrong, I
> > appreciate your pointing me out.
>
> Brace positioning is off w.r.t. our conventions -- please fix that and
> resubmit.

Here's updated version. Thanks for your advice.

Hitoshi Harada

2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> H.Harada escribió:
>
>
> > # This is my first time to send a patch. If I did something wrong, I
> > appreciate your pointing me out.
>
> Brace positioning is off w.r.t. our conventions -- please fix that and
> resubmit.
>
> I have added this patch to the May commitfest.
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>

Attachment Content-Type Size
generate_series_timestamp.20080424.patch.gz application/x-gzip 1.7 KB

From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-01 00:16:08
Message-ID: e08cc0400804301716v66b628actee13a52ec4461ae5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Here's the sync and updated patch.
It contains "strict" in catalog as well.

Hitoshi Harada

2008/4/24 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>
> > H.Harada escribió:
> >
> >
> > > # This is my first time to send a patch. If I did something wrong, I
> > > appreciate your pointing me out.
> >
> > Brace positioning is off w.r.t. our conventions -- please fix that and
> > resubmit.
>
> Here's updated version. Thanks for your advice.
>
> Hitoshi Harada
>
> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>
>
> > H.Harada escribió:
> >
> >
> > > # This is my first time to send a patch. If I did something wrong, I
> > > appreciate your pointing me out.
> >
> > Brace positioning is off w.r.t. our conventions -- please fix that and
> > resubmit.
> >
> > I have added this patch to the May commitfest.
> >
> > --
> > Alvaro Herrera http://www.CommandPrompt.com/
> > The PostgreSQL Company - Command Prompt, Inc.
> >
>

Attachment Content-Type Size
generate_series_timestamp.20080501.patch.gz application/x-gzip 1.7 KB

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "H(dot) Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-01 05:02:39
Message-ID: 162867790804302202m210c2fb0qf8981372d9fd280e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hello

why you don't use polymorphic types?

like:

create or replace function generate_time_series(anyelement,
anyelement, interval, OUT result anyelement)
returns setof anyelement as $$
begin
result := $1;
while (result <= $2) loop
return next;
result := result + $3;
end loop;
return;
end;
$$ language plpgsql;

Regards
Pavel Stehule

2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> Here's the sync and updated patch.
> It contains "strict" in catalog as well.
>
> Hitoshi Harada
>
> 2008/4/24 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>>
>> > H.Harada escribió:
>> >
>> >
>> > > # This is my first time to send a patch. If I did something wrong, I
>> > > appreciate your pointing me out.
>> >
>> > Brace positioning is off w.r.t. our conventions -- please fix that and
>> > resubmit.
>>
>> Here's updated version. Thanks for your advice.
>>
>> Hitoshi Harada
>>
>> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>>
>>
>> > H.Harada escribió:
>> >
>> >
>> > > # This is my first time to send a patch. If I did something wrong, I
>> > > appreciate your pointing me out.
>> >
>> > Brace positioning is off w.r.t. our conventions -- please fix that and
>> > resubmit.
>> >
>> > I have added this patch to the May commitfest.
>> >
>> > --
>> > Alvaro Herrera http://www.CommandPrompt.com/
>> > The PostgreSQL Company - Command Prompt, Inc.
>> >
>>
>
>
> --
> Sent via pgsql-patches mailing list (pgsql-patches(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-patches
>
>


From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-01 07:36:15
Message-ID: e08cc0400805010036j3101d4c8re559a77027665928@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hello
>
> why you don't use polymorphic types?
Ah, good idea. I didn't think we could fix the third argument to
"interval" but "anyelement".
For a temporal version, it's reasonable.

Also, the name "generate_time_series" is better than before?

Hitoshi Harada

2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hello
>
> why you don't use polymorphic types?
>
> like:
>
> create or replace function generate_time_series(anyelement,
> anyelement, interval, OUT result anyelement)
> returns setof anyelement as $$
> begin
> result := $1;
> while (result <= $2) loop
> return next;
> result := result + $3;
> end loop;
> return;
> end;
> $$ language plpgsql;
>
> Regards
> Pavel Stehule
>
>
>
> 2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>
>
> > Here's the sync and updated patch.
> > It contains "strict" in catalog as well.
> >
> > Hitoshi Harada
> >
> > 2008/4/24 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> >>
> >> > H.Harada escribió:
> >> >
> >> >
> >> > > # This is my first time to send a patch. If I did something wrong, I
> >> > > appreciate your pointing me out.
> >> >
> >> > Brace positioning is off w.r.t. our conventions -- please fix that and
> >> > resubmit.
> >>
> >> Here's updated version. Thanks for your advice.
> >>
> >> Hitoshi Harada
> >>
> >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> >>
> >>
> >> > H.Harada escribió:
> >> >
> >> >
> >> > > # This is my first time to send a patch. If I did something wrong, I
> >> > > appreciate your pointing me out.
> >> >
> >> > Brace positioning is off w.r.t. our conventions -- please fix that and
> >> > resubmit.
> >> >
> >> > I have added this patch to the May commitfest.
> >> >
> >> > --
> >> > Alvaro Herrera http://www.CommandPrompt.com/
> >> > The PostgreSQL Company - Command Prompt, Inc.
> >> >
> >>
> >
> >
> > --
> > Sent via pgsql-patches mailing list (pgsql-patches(at)postgresql(dot)org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-patches
> >
> >
>


From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-01 14:05:19
Message-ID: e08cc0400805010705o6143acfem451d16d22bf42893@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
> > Hello
> >
> > why you don't use polymorphic types?
> Ah, good idea. I didn't think we could fix the third argument to
> "interval" but "anyelement".
> For a temporal version, it's reasonable.

I was thinking about it again. There are 3 points:

a. It will get complicated in the function to resolve operator for
polymorphic types, including search for namespace and error (not
found) handling.
b. Other temporal data types than timestamp is easy to be casted from
timestamp results.
c. In the integer version of generate_series also it is possible to
cast the results to other numerical types though harder to cast them
to temporal data types.

So it would be better to keep current patch, isn't it?

postgres=# select generate_series('2008/05/01 20:00'::timestamp,
'2008/05/02 08:00'::timestamp
, '1 hour'::interval);
generate_series
---------------------
2008-05-01 20:00:00
2008-05-01 21:00:00
2008-05-01 22:00:00
2008-05-01 23:00:00
2008-05-02 00:00:00
2008-05-02 01:00:00
2008-05-02 02:00:00
2008-05-02 03:00:00
2008-05-02 04:00:00
2008-05-02 05:00:00
2008-05-02 06:00:00
2008-05-02 07:00:00
2008-05-02 08:00:00
(13 rows)

postgres=# select generate_series('2008/05/01 20:00'::timestamp,
'2008/05/02 08:00'::timestamp
, '1 hour'::interval)::time;
generate_series
-----------------
20:00:00
21:00:00
22:00:00
23:00:00
00:00:00
01:00:00
02:00:00
03:00:00
04:00:00
05:00:00
06:00:00
07:00:00
08:00:00
(13 rows)

postgres=# select generate_series('2008/05/01 20:00'::timestamp,
'2008/05/02 08:00'::timestamp
, '1 hour'::interval)::timestamptz;
generate_series
------------------------
2008-05-01 20:00:00+09
2008-05-01 21:00:00+09
2008-05-01 22:00:00+09
2008-05-01 23:00:00+09
2008-05-02 00:00:00+09
2008-05-02 01:00:00+09
2008-05-02 02:00:00+09
2008-05-02 03:00:00+09
2008-05-02 04:00:00+09
2008-05-02 05:00:00+09
2008-05-02 06:00:00+09
2008-05-02 07:00:00+09
2008-05-02 08:00:00+09
(13 rows)

postgres=# select generate_series('2008/05/01 20:00'::timestamp,
'2008/05/02 08:00'::timestamp
, '1 hour'::interval)::date;
generate_series
-----------------
2008-05-01
2008-05-01
2008-05-01
2008-05-01
2008-05-02
2008-05-02
2008-05-02
2008-05-02
2008-05-02
2008-05-02
2008-05-02
2008-05-02
2008-05-02
(13 rows)

Hitoshi Harada

2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
> > Hello
> >
> > why you don't use polymorphic types?
> Ah, good idea. I didn't think we could fix the third argument to
> "interval" but "anyelement".
> For a temporal version, it's reasonable.
>
> Also, the name "generate_time_series" is better than before?
>
> Hitoshi Harada
>
>
> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
>
> > Hello
> >
> > why you don't use polymorphic types?
> >
> > like:
> >
> > create or replace function generate_time_series(anyelement,
> > anyelement, interval, OUT result anyelement)
> > returns setof anyelement as $$
> > begin
> > result := $1;
> > while (result <= $2) loop
> > return next;
> > result := result + $3;
> > end loop;
> > return;
> > end;
> > $$ language plpgsql;
> >
> > Regards
> > Pavel Stehule
> >
> >
> >
> > 2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> >
> >
> > > Here's the sync and updated patch.
> > > It contains "strict" in catalog as well.
> > >
> > > Hitoshi Harada
> > >
> > > 2008/4/24 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> > >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> > >>
> > >> > H.Harada escribió:
> > >> >
> > >> >
> > >> > > # This is my first time to send a patch. If I did something wrong, I
> > >> > > appreciate your pointing me out.
> > >> >
> > >> > Brace positioning is off w.r.t. our conventions -- please fix that and
> > >> > resubmit.
> > >>
> > >> Here's updated version. Thanks for your advice.
> > >>
> > >> Hitoshi Harada
> > >>
> > >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> > >>
> > >>
> > >> > H.Harada escribió:
> > >> >
> > >> >
> > >> > > # This is my first time to send a patch. If I did something wrong, I
> > >> > > appreciate your pointing me out.
> > >> >
> > >> > Brace positioning is off w.r.t. our conventions -- please fix that and
> > >> > resubmit.
> > >> >
> > >> > I have added this patch to the May commitfest.
> > >> >
> > >> > --
> > >> > Alvaro Herrera http://www.CommandPrompt.com/
> > >> > The PostgreSQL Company - Command Prompt, Inc.
> > >> >
> > >>
> > >
> > >
> > > --
> > > Sent via pgsql-patches mailing list (pgsql-patches(at)postgresql(dot)org)
> > > To make changes to your subscription:
> > > http://www.postgresql.org/mailpref/pgsql-patches
> > >
> > >
> >
>


From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "H(dot) Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-01 18:36:10
Message-ID: 162867790805011136x2cf282c2n3a0530805f5b1427@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
> 2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>
>> > Hello
>> >
>> > why you don't use polymorphic types?
>> Ah, good idea. I didn't think we could fix the third argument to
>> "interval" but "anyelement".
>> For a temporal version, it's reasonable.
>
> I was thinking about it again. There are 3 points:
>
> a. It will get complicated in the function to resolve operator for
> polymorphic types, including search for namespace and error (not
> found) handling.

yes, it's true;

> b. Other temporal data types than timestamp is easy to be casted from
> timestamp results.
> c. In the integer version of generate_series also it is possible to
> cast the results to other numerical types though harder to cast them
> to temporal data types.
>
> So it would be better to keep current patch, isn't it?
>

I missing generator for date - casting from and to timestemp is
little bit ugly - but polymorphic types in C isn't good idea, I see
it.

Regards
Pavel Stehule
>
> postgres=# select generate_series('2008/05/01 20:00'::timestamp,
> '2008/05/02 08:00'::timestamp
> , '1 hour'::interval);
> generate_series
> ---------------------
> 2008-05-01 20:00:00
> 2008-05-01 21:00:00
> 2008-05-01 22:00:00
> 2008-05-01 23:00:00
> 2008-05-02 00:00:00
> 2008-05-02 01:00:00
> 2008-05-02 02:00:00
> 2008-05-02 03:00:00
> 2008-05-02 04:00:00
> 2008-05-02 05:00:00
> 2008-05-02 06:00:00
> 2008-05-02 07:00:00
> 2008-05-02 08:00:00
> (13 rows)
>
> postgres=# select generate_series('2008/05/01 20:00'::timestamp,
> '2008/05/02 08:00'::timestamp
> , '1 hour'::interval)::time;
> generate_series
> -----------------
> 20:00:00
> 21:00:00
> 22:00:00
> 23:00:00
> 00:00:00
> 01:00:00
> 02:00:00
> 03:00:00
> 04:00:00
> 05:00:00
> 06:00:00
> 07:00:00
> 08:00:00
> (13 rows)
>
> postgres=# select generate_series('2008/05/01 20:00'::timestamp,
> '2008/05/02 08:00'::timestamp
> , '1 hour'::interval)::timestamptz;
> generate_series
> ------------------------
> 2008-05-01 20:00:00+09
> 2008-05-01 21:00:00+09
> 2008-05-01 22:00:00+09
> 2008-05-01 23:00:00+09
> 2008-05-02 00:00:00+09
> 2008-05-02 01:00:00+09
> 2008-05-02 02:00:00+09
> 2008-05-02 03:00:00+09
> 2008-05-02 04:00:00+09
> 2008-05-02 05:00:00+09
> 2008-05-02 06:00:00+09
> 2008-05-02 07:00:00+09
> 2008-05-02 08:00:00+09
> (13 rows)
>
> postgres=# select generate_series('2008/05/01 20:00'::timestamp,
> '2008/05/02 08:00'::timestamp
> , '1 hour'::interval)::date;
> generate_series
> -----------------
> 2008-05-01
> 2008-05-01
> 2008-05-01
> 2008-05-01
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> 2008-05-02
> (13 rows)
>
>
> Hitoshi Harada
>
> 2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>
>> > Hello
>> >
>> > why you don't use polymorphic types?
>> Ah, good idea. I didn't think we could fix the third argument to
>> "interval" but "anyelement".
>> For a temporal version, it's reasonable.
>>
>> Also, the name "generate_time_series" is better than before?
>>
>> Hitoshi Harada
>>
>>
>> 2008/5/1 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>
>>
>> > Hello
>> >
>> > why you don't use polymorphic types?
>> >
>> > like:
>> >
>> > create or replace function generate_time_series(anyelement,
>> > anyelement, interval, OUT result anyelement)
>> > returns setof anyelement as $$
>> > begin
>> > result := $1;
>> > while (result <= $2) loop
>> > return next;
>> > result := result + $3;
>> > end loop;
>> > return;
>> > end;
>> > $$ language plpgsql;
>> >
>> > Regards
>> > Pavel Stehule
>> >
>> >
>> >
>> > 2008/5/1 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>> >
>> >
>> > > Here's the sync and updated patch.
>> > > It contains "strict" in catalog as well.
>> > >
>> > > Hitoshi Harada
>> > >
>> > > 2008/4/24 H. Harada <umi(dot)tanuki(at)gmail(dot)com>:
>> > >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>> > >>
>> > >> > H.Harada escribió:
>> > >> >
>> > >> >
>> > >> > > # This is my first time to send a patch. If I did something wrong, I
>> > >> > > appreciate your pointing me out.
>> > >> >
>> > >> > Brace positioning is off w.r.t. our conventions -- please fix that and
>> > >> > resubmit.
>> > >>
>> > >> Here's updated version. Thanks for your advice.
>> > >>
>> > >> Hitoshi Harada
>> > >>
>> > >> 2008/4/23 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
>> > >>
>> > >>
>> > >> > H.Harada escribió:
>> > >> >
>> > >> >
>> > >> > > # This is my first time to send a patch. If I did something wrong, I
>> > >> > > appreciate your pointing me out.
>> > >> >
>> > >> > Brace positioning is off w.r.t. our conventions -- please fix that and
>> > >> > resubmit.
>> > >> >
>> > >> > I have added this patch to the May commitfest.
>> > >> >
>> > >> > --
>> > >> > Alvaro Herrera http://www.CommandPrompt.com/
>> > >> > The PostgreSQL Company - Command Prompt, Inc.
>> > >> >
>> > >>
>> > >
>> > >
>> > > --
>> > > Sent via pgsql-patches mailing list (pgsql-patches(at)postgresql(dot)org)
>> > > To make changes to your subscription:
>> > > http://www.postgresql.org/mailpref/pgsql-patches
>> > >
>> > >
>> >
>>
>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "H(dot)Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-04 23:21:57
Message-ID: 12521.1209943317@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"H.Harada" <umi(dot)tanuki(at)gmail(dot)com> writes:
> Here's the sync and updated patch.
> It contains "strict" in catalog as well.

Applied with some revisions ---

I added a timestamptz version; it didn't seem very appropriate to have
only a timestamp version.

You can't just pick a convenient-looking OID, you must use one that
the unused_oids script reports as free.

There was no check for a zero step size.

There was no documentation.

regards, tom lane


From: H(dot)Harada <umi(dot)tanuki(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: temporal version of generate_series()
Date: 2008-05-05 01:50:26
Message-ID: e08cc0400805041850x77c6be65v697c25f675ac4df7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

2008/5/5 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Applied with some revisions ---
>
> I added a timestamptz version; it didn't seem very appropriate to have
> only a timestamp version.
>
> You can't just pick a convenient-looking OID, you must use one that
> the unused_oids script reports as free.
I didn't know the unused_oids script. I'll try it next time.

Thanks for many notices anyway.

Hitoshi Harada