tablefunc extension - Mailing list pgsql-bugs

From Carl Clemens
Subject tablefunc extension
Date
Msg-id 5780E380C79B5F4B8767873021244A8F129B56AB@Buf-EX1.ctg.com
Whole thread Raw
Responses Re: tablefunc extension  (Joe Conway <mail@joeconway.com>)
List pgsql-bugs
Hi Folks,

The following query appears to be correct but fails to execute.

\set VERBOSITY verbose

select * from crosstab('select claim_id::bigint, patient_id::integer, code_=
id::text from diagnosis') as dg_list(claim_id bigint, patient_id integer, c=
ode_id text);

ERROR:  42601: return and sql tuple descriptions are incompatible
LOCATION:  crosstab, tablefunc.c:445

The above query works if patient_id is cast to text.  The claim_id as bigin=
t works too.

postgres   9.2.4
openSUSE 12.3 (x86_64)
VERSION =3D 12.3


diagnosis
--------------+--------------+---------------------------------------------=
----------------------
id            | integer      | not null default nextval('diagnosis_id_seq':=
:regclass)
patient_id    | integer      | not null
code_id       | text         | not null
claim_id      | bigint       |
 seq_num       | smallint     |
 poa_indicator | character(1) |



Thanks for your time and help.

Carl Clemens




The information transmitted is intended only for the person or entity to wh=
ich
it is addressed and may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any act=
ion
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited. If you are not the intended recipient of =
this =

message, please contact the sender and delete this material from this compu=
ter.

pgsql-bugs by date:

Previous
From: OTSUKA Kenji
Date:
Subject: Re: BUG #8434: Why does dead lock occur many times ?
Next
From: Alexey Klyukin
Date:
Subject: psql \i command with a missing file name doesn't rollback the transaction