Re: How can I use crosstab functons in PostgreSQL 9.3? - Mailing list pgsql-general

From Rob Richardson
Subject Re: How can I use crosstab functons in PostgreSQL 9.3?
Date
Msg-id 67D108EDFAD3C148A593E6ED7DCB4BBD014F1A152B@RADCONWIN2K8PDC.radcon.local
Whole thread Raw
In response to Re: How can I use crosstab functons in PostgreSQL 9.3?  (Tim Clarke <tim.clarke@manifest.co.uk>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Tim Clarke
Date:
Subject: Re: How can I use crosstab functons in PostgreSQL 9.3?
Next
From: Rob Richardson
Date:
Subject: Re: How can I use crosstab functons in PostgreSQL 9.3?