Re: data type of projected item in a union not correct
От | David Johnston |
---|---|
Тема | Re: data type of projected item in a union not correct |
Дата | |
Msg-id | 1373D8CF-EC10-4AF4-AC37-9887476D4FC2@yahoo.com обсуждение исходный текст |
Ответ на | data type of projected item in a union not correct (the6campbells <the6campbells@gmail.com>) |
Ответы |
Re: data type of projected item in a union not correct
|
Список | pgsql-jdbc |
On Sep 24, 2012, at 19:43, the6campbells <the6campbells@gmail.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 itshould 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.
В списке pgsql-jdbc по дате отправления: