Re: Return and sql tuple descriptions are incompatible

From: "Hengky Liwandouw" <hengkyliwandouw(at)gmail(dot)com>
To: "'pgsql-general General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Return and sql tuple descriptions are incompatible
Date: 2014-04-25 15:58:25
Message-ID: 000d01cf609f$337dc220$9a794660$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe,

Thanks to give me the right direction to get help. Okay, here is the detail.

CREATE table test (id SERIAL, produkid TEXT, warehousename TEXT, onhand
INTEGER);

COPY test (id, produkid, warehousename, onhand) FROM stdin;
1 2791404000014 OFFICE 10
2 2791404000021 STORE2 10
3 2791404000014 STORE2 45
\.

select *
from crosstab('select produkid, warehousename, onhand from test order by
1,2')
as ct (row_name text, categori_1 text, categori_2 text)

Result : ERROR: return and sql tuple descriptions are incompatible

Hope to get solution for this.

Hengky

-----Original Message-----
From: Joe Conway [mailto:mail(at)joeconway(dot)com]
Sent: Friday, April 25, 2014 10:23 PM
To: Hengky Liwandouw; 'pgsql-general General'
Subject: Re: [GENERAL] Return and sql tuple descriptions are incompatible

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/25/2014 12:19 AM, Hengky Liwandouw wrote:
> I have read the instruction, change warehouseid to text, spend
> several hours to test many option but it doesn't help.

Please send a complete, self-contained test case which reproduces your
error. By that I mean CREATE statements for tables and view involved,
COPY statements with sufficient sample data, and your failing query. I
realize you have sent bits and pieces of this, but it should be
together in one spot. Then we can easily cut and paste to reproduce
the error, and determine the issue.

In other words, help us help you.

Joe

- --
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTWm+0AAoJEDfy90M199hlpfQP/2wpUJcAj2Z6+uOAbqJoBYDJ
JY/9oj/dkuySAqL4qWQSLqNZf8nwPNXpst9exQs4Sf6GQa+j47AamWy+G1++J/x8
HRe76VslP1r7vBY4x0kx7a3U8KkcfrPlZAOLVjpFDjvcALPMVgy8AfHRLWTSOmQt
VmjKe1t/k1Znb8buAAUILs+1Q0c81hihv7AGTUZQL/oxCBBmNPpmZPHFR3ZO3NOm
wfmLP/U/lHGd2ev/d9DShi0Q2LKyPQu4Q/WIsc6z+eThd991rP3TIlhKl79snzxv
XgFEQRP2DeRgW/S/43gguIWb53Wimfj0RN6mJZN9DFJO72kAyin0Cs2BDKN3kHbD
D8UkE9Qjnj7UqZzIrZ3+XLLmG04KNmFl9H1HxD8xPudyO4DG4gXkbsvSQ9US0ThG
ZOk5ipOmUupjlgEis9W1QvDlc8jqJo5AbYLPAQ7S9cd9ougKDsD7YUeQdSwQod+H
ls2u2JqFfdewsb5YupSGlvY6k5SVchz+SD8JSlYXRG4yqiLivHwudwsSADaQAJyj
YZiLduHoXKjnPKASpqATTtfSvXdKxbJLJZg9Gf5CgLIlIl30tQjMRQ/iFfPq2jTD
rK8p+AKQrVoHD8/7T1rkBfLa9Vp3r/BqyYz3OgSLcHhnZg5lanfSK0jwKKNSGIoV
2sSy4zVI9+ioNL+lUggN
=JHtf
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2014-04-25 16:41:52 Re: Return and sql tuple descriptions are incompatible
Previous Message Joe Conway 2014-04-25 14:22:44 Re: Return and sql tuple descriptions are incompatible