Skip site navigation (1) Skip section navigation (2)

date bug

From: "Jeff Patterson" <jpat(at)mywayhealth(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: date bug
Date: 2001-05-15 01:33:32
Message-ID: 1D9DC8FD001A924DA482B2B85E2EC6AD01B52D@redmond.mwhnorth.local (view raw or whole thread)
Lists: pgsql-bugs
Strange date behavior as shown below. 

create table "holidays" ("date" date NOT NULL,"name" varchar(25));
insert into holidays values ('01-01-2001'::date,'New Years');
insert into holidays values ('01-15-2001'::date,'Kings Birthday');
insert into holidays values ('02-19-2001'::date,'Presidents Day');

create function is_holiday (date) returns bool as 
		when $1=date then 1::bool 
		else 0::bool 
from holidays' language 'sql'

test=# select date,is_holiday(date) from holidays;
        date   | is_holiday 
 2001-01-01 | t
 2001-01-15 | f
 2001-02-19 | f
(3 rows)

Jeffery S. Patterson

e-mail: jpat(at)meta-lynx(dot)com
Phone : 707-431-9320
  Fax : 707-433-2918

132 Mill St. Suite 210
Healdsburg, CA 95448

This message contains information that may be confidential and
privileged.  Unless you are the addressee (or authorized to receive for
the addressee), you may not use, copy or disclose to anyone the message
or any information contained in the message.  If you have received the
message in error, please advise the sender by reply e-mail
jpat(at)meta-lynx(dot)com, and delete the message.  Thank you very much.


pgsql-bugs by date

Next:From: Tom LaneDate: 2001-05-15 02:43:12
Subject: Re: REQ: build src/backend/postgres w/o -lncurses or -lreadline
Previous:From: Tom LaneDate: 2001-05-15 00:49:22
Subject: Re: Postgres bug (working with iserverd)

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group