From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | pgsql-general(at)postgresql(dot)org, Chris Travers <chris(at)travelamericas(dot)com> |
Subject: | Re: Bug and/or feature? Complex data types in tables... |
Date: | 2004-01-15 17:47:55 |
Message-ID: | F2F2B8F2-4782-11D8-B824-000A95C88220@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hi Alvaro,
On Jan 15, 2004, at 10:31 PM, Alvaro Herrera wrote:
> Maybe it's tangential to this discussion, but there's a type to store
> that kind of intervals. It's called tinterval. ISTM it's not too much
> documented, and I haven't really used it.
>
> alvherre=> select tinterval('2003-10-28', '2004-11-05');
> tinterval
> -----------------------------------------------------
> ["2003-10-28 00:00:00-03" "2004-11-05 00:00:00-03"]
> (1 fila)
>
> alvherre=> select tinterval('2003-10-28', '2004-11-05') &&
> tinterval('2003-10-05', '2003-10-15');
> ?column?
> ----------
> f
> (1 fila)
>
> alvherre=> select tinterval('2003-10-28', '2004-11-05') &&
> tinterval('2003-10-05', '2003-11-15');
> ?column?
> ----------
> t
> (1 fila)
>
> (There are other operators, of course ...)
Well, lookee here! Thanks a lot, Alvaro!. Tangential or not, it's
definitely something I'm interested in! More exploring to do!
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | JustSomeGuy | 2004-01-15 17:51:15 | newbie question on database structure |
Previous Message | Daniel E. Fisher | 2004-01-15 17:47:53 | Re: Errors after power failure |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2004-01-15 19:23:09 | Re: Bug and/or feature? Complex data types in tables... |
Previous Message | Merlin Moncure | 2004-01-15 16:43:05 | Re: Encoding problems in PostgreSQL with XML data |