[GENERAL] Unable to call functions defined in XML2 contrib

2010-03-12 Thread Franclin Foping
Hi All,
 I am running PostgreSQL 8.4 offered with OpenSUSE 11.2. It works
exceptionally well. I have installed the contrib package in order to use
the functions provided by XML2/pg_xml as explained in this page:
http://www.postgresql.org/docs/8.4/static/xml2.html
 However, when I try to run this SQL command: 
SELECT * FROM

  xpath_table('id','xml','test',
  
'/doc/@num|/doc/line/@num|/doc/line/a|/doc/line/b|/doc/line/c',
  'true')
  AS t(id int4, doc_num varchar(10), line_num varchar(10), val1 int4, val2 
int4, val3 int4)
WHERE id = 1 ORDER BY doc_num, line_num

It returns an error saying that: 

 ERROR:  function xpath_table(unknown, unknown, unknown, unknown,
unknown) does not exist
LINE 2:   xpath_table('id','xml','test',
  ^
HINT:  *No function matches the given name and argument types. You might
need to add explicit type casts.*

** Error **

ERROR: function xpath_table(unknown, unknown, unknown, 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: 21

Don't know what is wrong.
I am anxiously waiting for your reply.
 Franclin.


Re: [GENERAL] Unable to call functions defined in XML2 contrib

2010-03-12 Thread Tom Lane
Franclin Foping f.fop...@4c.ucc.ie writes:
  I am running PostgreSQL 8.4 offered with OpenSUSE 11.2. It works
 exceptionally well. I have installed the contrib package in order to use
 the functions provided by XML2/pg_xml as explained in this page:
 http://www.postgresql.org/docs/8.4/static/xml2.html
 [ but it's not there ]

Did you actually install the module?  This involves both making the
pgxml.so file available, and running the pgxml.sql script in each database
you want to use the functions in.  See
http://www.postgresql.org/docs/8.4/static/contrib.html
for a general description of installing contrib modules.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Unable to call functions defined in XML2 contrib

2010-03-12 Thread Franclin Foping
On 12/03/10 15:34, Tom Lane wrote:
 Franclin Foping f.fop...@4c.ucc.ie writes:
   
  I am running PostgreSQL 8.4 offered with OpenSUSE 11.2. It works
 exceptionally well. I have installed the contrib package in order to use
 the functions provided by XML2/pg_xml as explained in this page:
 http://www.postgresql.org/docs/8.4/static/xml2.html
 [ but it's not there ]
 
 Did you actually install the module?  This involves both making the
 pgxml.so file available, and running the pgxml.sql script in each database
 you want to use the functions in.  See
 http://www.postgresql.org/docs/8.4/static/contrib.html
 for a general description of installing contrib modules.

   regards, tom lane

   
It is now sorted.
 Thanks
Franclin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general