How to use daterange type?

From: Csanyi Pal <csanyipal(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to use daterange type?
Date: 2013-03-16 21:05:24
Message-ID: 87li9n2gyz.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm using postgresql 9.2.

I'm trying to figure out how can I use daterange type in my database
that is supposed to be a school calendar.

I did the followings at the postgresql command prompt:

create database schoolcalendar;
create table semester_1 ( schooldays daterange );
insert into semester_1 values ( '[2012-09-01, 2012-12-24]' );

So how can I use this table further eg. to get dates of the school days
but without Saturdays and Sundays?

--
Regards from Pal

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-03-17 04:30:18 Re: Addled index
Previous Message Oleg Alexeev 2013-03-16 20:54:36 Re: Addled index