From: | the6campbells <the6campbells(at)gmail(dot)com> |
---|---|
To: | David Johnston <polobo(at)yahoo(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: data type of projected item in a union not correct |
Date: | 2012-09-25 01:26:17 |
Message-ID: | CAFEjsq7JgMUBnprRNMGUhiez_UfZ=6bdE3kTda01zGxAoyXjrw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
per the ISO-SQL 20xx specification and many vendors vrchar(32)
On Mon, Sep 24, 2012 at 8:29 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:
> On Sep 24, 2012, at 19:43, the6campbells <the6campbells(at)gmail(dot)com> wrote:
>
> > Database 9.0.4
> > Driver PostgreSQL 9.1 JDBC4 (build 902)
> >
> >
> > The following projection is not described with the expected
> type+precision as one would expect from ISO-SQL
> >
> > Is this a known Postgres bug, quirk or ....
> >
> > t1.c1 char(32)
> > t2.c1 varchar(32)
> >
> > select t1.c1 returns precision of 32
> > select t2.c1 returned precision of 32
> >
> >
> > t1.c1
> > union
> > t2.c1
> >
> > t2.c1
> > union
> > t1.c1
> >
> > returns precision 2147483647
> >
> >
>
> From the description here
>
> http://www.postgresql.org/docs/9.2/interactive/typeconv-union-case.html
>
> I infer that since the two types are not the same they are both converted
> to the preferred base type "text" which while it should have an undefined
> precision instead is reported to have an arbitrary large precision.
>
> What result do you feel it should report and for what reason?
>
> David J.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | the6campbells | 2012-09-25 01:33:00 | data set combination of integer and decimal/numeric returns wrong result type |
Previous Message | David Johnston | 2012-09-25 00:29:12 | Re: data type of projected item in a union not correct |