From: | "Ronin" <jkoorts(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pgsql bug found? |
Date: | 2006-12-04 14:52:19 |
Message-ID: | 1165243939.335415.278230@j44g2000cwa.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi when I do the following function it fills 2 dates per day from 1970
to 2050, except that some months (typical 2 months per year) have 4
dates for one day. this is totally freaky.. I wonder if postgresql is
tripping over itself making a double entry every now and again.
for instance I constantly get the following entries
"2006-10-01 00:00:00"
"2006-10-01 23:59:59.999"
"2006-10-01 00:00:00"
"2006-10-01 23:59:59.999"
Any ideas?
Here the function
DECLARE
yearcnt integer;
monthcnt integer;
daycnt integer;
BEGIN
FOR yearcnt IN 1970..2050 LOOP
monthcnt=1;
FOR monthcnt IN 1..12 LOOP
daycnt = 1;
FOR daycnt IN 1..31 LOOP
insert into datepool values
(to_timestamp(yearcnt||'-'||to_char(monthcnt,'FM00')||'-'||to_char(daycnt,'FM09')||'
00:00:00.000','YYYY MM DD HH24:MI:SS.MS'));
insert into datepool values
(to_timestamp(yearcnt||'-'||to_char(monthcnt,'FM00')||'-'||to_char(daycnt,'FM09')||'
23:59:59.999','YYYY MM DD HH24:MI:SS.MS'));
END LOOP;
END LOOP;
END LOOP;
return;
END;
From | Date | Subject | |
---|---|---|---|
Next Message | Timasmith | 2006-12-04 15:18:44 | getting index columns from information_schema? |
Previous Message | Mark Morgan Lloyd | 2006-12-04 14:36:22 | Re: Locking for function creation |