bug-report

From: Eivind Kvedalen <eivindkv(at)ifi(dot)uio(dot)no>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bug-report
Date: 2000-10-16 19:53:21
Message-ID: Pine.SOL.4.21.0010162150450.674-100000@naglfar.ifi.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

============================================================================
POSTGRESQL BUG REPORT
============================================================================

Your name : Eivind Kvedalen
Your email address : eivindkv(at)ifi(dot)uio(dot)no

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium III

Operating System (example: Linux 2.0.26 ELF) :
Linux support 2.2.14 #9 SMP Thu Oct 12 12:10:07 CEST 2000 i686 unknown

PostgreSQL version (example: PostgreSQL-7.0): PostgreSQL-7.0.2

Compiler used (example: gcc 2.8.0) : egcs-2.91.66

Please enter a FULL description of your problem:
------------------------------------------------

to_char gives incorrect day conversion of the date 2000/03/26.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

The SQL-code

create table test_table (
date_col date
);

insert into test_table values ('2000/03/25');
insert into test_table values ('2000/03/26');

select date_col from test_table;
select to_char(date_col, 'YYYY/MM/DD - WW') from test_table;

drop table test_tab

results in

CREATE
INSERT 2370569 1
INSERT 2370570 1
date_col
------------
2000-03-25
2000-03-26
(2 rows)

to_char
-----------------
2000/03/25 - 12
2000/03/25 - 12
(2 rows)

which is incorrect. I have not detected any other dates which gives
the same result.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-10-16 20:06:03 Re: constraints evaluate 'now' immediately
Previous Message pgsql-bugs 2000-10-16 17:42:51 constraints evaluate 'now' immediately