pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feed"Mons" in JDBC driver
5+ messages / 3 participants
[nested] [flat]
* "Mons" in JDBC driver
@ 2010-08-02 15:30 Alexander Yerenkow <yerenkow@uct.ua>
2010-08-02 17:23 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Yerenkow @ 2010-08-02 15:30 UTC (permalink / raw)
To: pgsql-jdbc
Hello all.
Is it intended, that months is shrinked as "mons" instead "months"?
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/util/PGInterval.java?rev=1.14...
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Mons" in JDBC driver
2010-08-02 15:30 "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
@ 2010-08-02 17:23 ` Kris Jurka <books@ejurka.com>
2010-08-02 19:27 ` Re: "Mons" in JDBC driver Richard Broersma <richard.broersma@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2010-08-02 17:23 UTC (permalink / raw)
To: Alexander Yerenkow <yerenkow@uct.ua>; +Cc: pgsql-jdbc
On Mon, 2 Aug 2010, Alexander Yerenkow wrote:
> Is it intended, that months is shrinked as "mons" instead "months"?
>
> http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/util/PGInterval.java?rev=1.14...
>
Yes, this mirrors the server's behavior:
kjurka=# select '3 months'::interval;
interval
----------
3 mons
(1 row)
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Mons" in JDBC driver
2010-08-02 15:30 "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
2010-08-02 17:23 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
@ 2010-08-02 19:27 ` Richard Broersma <richard.broersma@gmail.com>
2010-08-02 20:02 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 5+ messages in thread
From: Richard Broersma @ 2010-08-02 19:27 UTC (permalink / raw)
To: Kris Jurka <books@ejurka.com>; +Cc: Alexander Yerenkow <yerenkow@uct.ua>; pgsql-jdbc
On Mon, Aug 2, 2010 at 10:23 AM, Kris Jurka <books@ejurka.com> wrote:
> Yes, this mirrors the server's behavior:
>
> kjurka=# select '3 months'::interval;
> interval
> ----------
> 3 mons
> (1 row)
From:
http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-INTERVALSTYLE
Here is what I see from the server:
p2082849b=> SET SESSION IntervalStyle TO DEFAULT;
SET
p2082849b=> select Interval '3 months';
interval
----------
3 mons
(1 row)
p2082849b=> SET session IntervalStyle TO 'postgres';
SET
p2082849b=> select Interval '3 months';
interval
----------
3 mons
(1 row)
p2082849b=> SET session IntervalStyle TO 'postgres_verbose';
SET
p2082849b=> select Interval '3 months';
interval
----------
@ 3 mons
(1 row)
p2082849b=> SET session IntervalStyle TO 'sql_standard';
SET
p2082849b=> select Interval '3 months';
interval
----------
0-3
(1 row)
p2082849b=> SET session IntervalStyle TO 'iso_8601';
SET
p2082849b=> select Interval '3 months';
interval
----------
P3M
(1 row)
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Mons" in JDBC driver
2010-08-02 15:30 "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
2010-08-02 17:23 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
2010-08-02 19:27 ` Re: "Mons" in JDBC driver Richard Broersma <richard.broersma@gmail.com>
@ 2010-08-02 20:02 ` Kris Jurka <books@ejurka.com>
2010-08-03 06:57 ` Re: "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
0 siblings, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2010-08-02 20:02 UTC (permalink / raw)
To: Richard Broersma <richard.broersma@gmail.com>; +Cc: Alexander Yerenkow <yerenkow@uct.ua>; pgsql-jdbc
On Mon, 2 Aug 2010, Richard Broersma wrote:
> [IntervalStyle can be changed]
>
Hmm. The JDBC driver explicitly sets DateStyle and complains loudly if
someone attempts to change it. I guess we should do the same for
IntervalStyle as well.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: "Mons" in JDBC driver
2010-08-02 15:30 "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
2010-08-02 17:23 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
2010-08-02 19:27 ` Re: "Mons" in JDBC driver Richard Broersma <richard.broersma@gmail.com>
2010-08-02 20:02 ` Re: "Mons" in JDBC driver Kris Jurka <books@ejurka.com>
@ 2010-08-03 06:57 ` Alexander Yerenkow <yerenkow@uct.ua>
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Yerenkow @ 2010-08-03 06:57 UTC (permalink / raw)
To: pgsql-jdbc
02.08.2010 23:02, Kris Jurka пишет:
>
>
> On Mon, 2 Aug 2010, Richard Broersma wrote:
>
>> [IntervalStyle can be changed]
>>
>
> Hmm. The JDBC driver explicitly sets DateStyle and complains loudly if
> someone attempts to change it. I guess we should do the same for
> IntervalStyle as well.
>
> Kris Jurka
Maybe my question was wrong :)
What is reason of Months are written as "mons" in this IntervalStyles?
1. Is this some wide term, for shortening months?
2. Is this described in any SQL standards? I have no access to these not
freely available standards, to check myself.
3. Is this just historical thing?
Thank you.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2010-08-03 06:57 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-08-02 15:30 "Mons" in JDBC driver Alexander Yerenkow <yerenkow@uct.ua>
2010-08-02 17:23 ` Kris Jurka <books@ejurka.com>
2010-08-02 19:27 ` Richard Broersma <richard.broersma@gmail.com>
2010-08-02 20:02 ` Kris Jurka <books@ejurka.com>
2010-08-03 06:57 ` Alexander Yerenkow <yerenkow@uct.ua>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox