Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGJ1Y-0001nf-Gf for pgsql-jdbc@postgresql.org; Tue, 25 Sep 2012 00:29:16 +0000 Received: from nm9-vm0.bullet.mail.ac4.yahoo.com ([98.139.53.192]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TGJ1V-0004KT-5x for pgsql-jdbc@postgresql.org; Tue, 25 Sep 2012 00:29:15 +0000 Received: from [98.139.52.193] by nm9.bullet.mail.ac4.yahoo.com with NNFMP; 25 Sep 2012 00:29:11 -0000 Received: from [98.139.52.179] by tm6.bullet.mail.ac4.yahoo.com with NNFMP; 25 Sep 2012 00:29:11 -0000 Received: from [127.0.0.1] by omp1062.mail.ac4.yahoo.com with NNFMP; 25 Sep 2012 00:29:11 -0000 X-Yahoo-Newman-Id: 862870.1164.bm@omp1062.mail.ac4.yahoo.com Received: (qmail 60428 invoked from network); 25 Sep 2012 00:29:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=2l2ZIbVQ8xXafK7AjMMQvpxMky86nmKKBrU5r13IbCxSJd/zz01vZtaYxW5vvDsO//cNdcN4DCBkNfAiOkVm8uNKxQVRZ0M0Gbvz/LBniKnWET3mixZUQ0Y1BeXn7dMeR3mVWO+eUsBguHzXz4eLq/uisOBnYyo6Tsn3DzcJuMY= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1348532951; bh=yHKEYXoIZlUZSf6Q1L9ItSd6pxoDw++cOr2hvgbRwU0=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:References:In-Reply-To:Mime-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=f6b6LvE72YOanZ55Le8lYV5xPJw5Zy6dZsItlLt/nLMywSPBld5VXxtP7oFA45PPjw+mt4p9BSWrXBWQcYcsS/DPkBSh2EajxlYJEYuClBoirlhR3EOSGwG7zDlDcwZTq7NE7dyU7adDjfe4eMbPheMWxjWJGB4zLOfmhYn6bJs= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CDBE6asVM1nMDDYrEqrJtFNATuDA1cbDNKPoFAzgJEgdrRr AMb9QBxljrRx35ShM2rPJljDku9IMqIK7EmGNy.nT11y_CMYv7jF_WxuIYJc iPN3EKbNUiuCcihvNkOl6g7iGRxjltfG0BnelR4hJahxn73oS52FF_9vlfL3 4rmqIT27Qmg3z6YCYLbS55Ni6KOFBF.XUAzvPiFmywE3B3Qetlp7cMSl2e3L SxNsgW2I1SIsxKNxUk0MN0gos71JYP1k6X3RokbiEvKeATPjtp_azXexGLZD wsUtpU9ijFe5znns5AsJBqL0gFPdaAirBlH2m6lX4yMeXXkrKAK8HxlWoAGO nZ9HjosaSTYNyz88T1nEwVkeB0z5zWK1dtlYJ6HMOBjaZS8pKhK0Q_BfSpbD b6ZorvrAarkyYbbjTlnExspkv0s.q96MK0m.hCMYdmA_hrP06OmbOjZrq9XY VCjerYvjvWoApis0jeIrud_i4z8x4w2mf.YbKCPonbX1neo3jtA.X5Xeyumj _.3hWD0V4GwaFJck43q6egZX3KHPsi7FecLShu2Uc7XEh8w-- X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from [192.12.17.101] (polobo@24.93.23.188 with xymcookie) by smtp106-mob.biz.mail.ac4.yahoo.com with SMTP; 24 Sep 2012 17:29:11 -0700 PDT References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <1373D8CF-EC10-4AF4-AC37-9887476D4FC2@yahoo.com> Cc: "pgsql-jdbc@postgresql.org" X-Mailer: iPad Mail (9B206) From: David Johnston Subject: Re: data type of projected item in a union not correct Date: Mon, 24 Sep 2012 20:29:12 -0400 To: the6campbells X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/72 X-Sequence-Number: 23308 On Sep 24, 2012, at 19:43, the6campbells wrote: > Database 9.0.4 > Driver PostgreSQL 9.1 JDBC4 (build 902) >=20 >=20 > The following projection is not described with the expected type+precision= as one would expect from ISO-SQL >=20 > Is this a known Postgres bug, quirk or .... >=20 > t1.c1 char(32) > t2.c1 varchar(32) >=20 > select t1.c1 returns precision of 32 > select t2.c1 returned precision of 32 >=20 >=20 > t1.c1 > union > t2.c1 >=20 > t2.c1 > union > t1.c1 >=20 > returns precision 2147483647 >=20 >=20 =46rom 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 prec= ision instead is reported to have an arbitrary large precision. What result do you feel it should report and for what reason? David J.