From: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
---|---|
To: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Questions about daterange() function |
Date: | 2014-06-26 20:17:05 |
Message-ID: | CAD3a31Vy8qJd3tQRGzSxE5SAT9dvZ1Em6L6oNCQDbZk06WZ15Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>
> > So here are my questions:
> >
> > 1) Is there anyway to control this behavior of daterange(), or is it
> just
> > best to (for example) add 1 to the upper bound argument if I want an
> > inclusive upper bound?
>
> See link for question #3; namely use the three-arg version of daterange
> (type,type,text)
>
>
> > 2) This is purely cosmetic, but is there anyway to control the output
> > formatting of a daterange to show the upper bound as inclusive? So that
> > daterange(d1,d2) would display as [d1,d2-1] rather than [d1,d2)?
>
> Not easily - you could write a custom type with the desired canonical form.
>
>
> > 3) I couldn't find this discussed in the documentation, and specifically
> > didn't find the daterange() function documented, including on this page
> > where I might have expected it:
> > http://www.postgresql.org/docs/9.3/static/functions-range.html. Is it
> > somewhere else where I'm not finding it?
>
> Yes, the documentation could maybe use some work on this topic. The
> relevant information is provided at:
>
> http://www.postgresql.org/docs/9.3/interactive/rangetypes.html
>
> See especially: 8.17.2 & 8.17.6
>
> David J.
>
>
> Thanks for your help!
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Questions-about-daterange-function-tp5809274p5809277.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://agency-software.org/demo/client
<https://agency-software.org/demo/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801
Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.
From | Date | Subject | |
---|---|---|---|
Next Message | James Le Cuirot | 2014-06-26 21:51:41 | Re: Alternative to psql -c ? |
Previous Message | Anand Kumar, Karthik | 2014-06-26 20:03:48 | Repeated semop calls |