Tim,
Thank you, but I think I already did that. The query is a dollar-quoted string, so there should be no need to do
anythingwith the single quote marks within it, so I would have thought the query engine would already know that it's
text. But after seeing the first error message, I explicitly casted it using "::text". The error message that time
saidthat crosstab(text) was not found, so that doesn't seem to be the problem.
RobR
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tim Clarke
Sent: Thursday, October 15, 2015 10:31 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How can I use crosstab functons in PostgreSQL 9.3?
Looks to me like argument types possibly? The article creates various combinations of crosstab() function but you are
passingin a query. Wrap your query in quotes (and then escape those within it). Then you'll be passing in a "text" type
notan "unknown" as the error clearly shows.
Tim Clarke