tablefunc extension

From: Carl Clemens <Carl(dot)Clemens(at)ctg(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Cc: William Andrews <William(dot)Andrews(at)ctg(dot)com>
Subject: tablefunc extension
Date: 2013-09-19 19:24:00
Message-ID: 5780E380C79B5F4B8767873021244A8F129B56AB@Buf-EX1.ctg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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, code_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 bigint works too.

postgres 9.2.4
openSUSE 12.3 (x86_64)
VERSION = 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 which
it is addressed and may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of, or taking of any action
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 computer.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2013-09-19 22:12:01 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Previous Message OTSUKA Kenji 2013-09-19 11:52:34 Re: BUG #8434: Why does dead lock occur many times ?