From: amr.fadly@vodafone.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14024: problem in Creating pivot table
Date: Wed, 16 Mar 2016 13:56:57 +0000
Message-ID: <20160316135657.5232.46379@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14024
Logged by: AmrFadly
Email address: amr.fadly@vodafone.com
PostgreSQL version: 9.5.0
Operating system: Windows 7
Description:
we are trying to do the example in the documentation to create pivot table
using crosstab function, it is not working and gives the below error:
ERROR: function crosstab(unknown, unknown) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need
to add explicit type casts.
Character: 15
the example is:
CREATE TABLE cth(rowid text, rowdt timestamp, attribute text, val text);
INSERT INTO cth VALUES('test1','01 March 2003','temperature','42');
INSERT INTO cth VALUES('test1','01 March 2003','test_result','PASS');
INSERT INTO cth VALUES('test1','01 March 2003','volts','2.6987');
INSERT INTO cth VALUES('test2','02 March 2003','temperature','53');
INSERT INTO cth VALUES('test2','02 March 2003','test_result','FAIL');
INSERT INTO cth VALUES('test2','02 March 2003','test_startdate','01 March
2003');
INSERT INTO cth VALUES('test2','02 March 2003','volts','3.1234');
SELECT * FROM crosstab('SELECT rowid, rowdt, attribute, val FROM cth ORDER
BY 1','SELECT DISTINCT attribute FROM cth ORDER BY 1')
AS
(
rowid text,
rowdt timestamp,
temperature int4,
test_result text,
test_startdate timestamp,
volts float8
);
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: amr.fadly@vodafone.com
Subject: Re: BUG #14024: problem in Creating pivot table
In-Reply-To: <20160316135657.5232.46379@wrigleys.postgresql.org>
References: <20160316135657.5232.46379@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox