By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,259 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

Crosstab function Problem

P: n/a
Hi,
I am having problem using the crosstab function ( which is under the contrib/tablefunc directory). I have installed the tablefunc module and also installed the functions into my DB.
I am using postgresql 7.4 beta version.

I am issuing the following query,

select *
from crosstab(
'select path,name,value
from file f, metadata m
where f.id = m.file_id
and f.type=1
order by 1,2;',3)
AS DP(name text,runid text, plottype text,region text) ;

I am getting the following error message.
No function matches the given name and argument types. You may need to add explicit typecasts.

I also issued the given example in the tablefunc directory and it gave the same error.

Help me out with this,
Kuldeep.

Nov 11 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Wednesday 03 September 2003 01:13, Kuldeep Tanna wrote:
Hi,
I am having problem using the crosstab function ( which is under the
contrib/tablefunc directory). I have installed the tablefunc module and
also installed the functions into my DB. I am using postgresql 7.4 beta
version.

I am issuing the following query, [snip] I am getting the following error message.
No function matches the given name and argument types. You may need to
add explicit typecasts.


From psql try:

\df cross*

This should list all functions starting with "cross" - if you don't see it,
the installation didn't work. If it is there, try casting the parameters:

SELECT * FROM crosstab('...'::text,3) AS...

That's assuming it takes a text for the first param, I suppose it could be
varchar.
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.