From: | George Weaver <gweaver(at)shaw(dot)ca> |
---|---|
To: | Theo Galanakis <Theo(dot)Galanakis(at)lonelyplanet(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Working with XML. |
Date: | 2005-02-21 14:55:39 |
Message-ID: | 005601c51825$6b430ca0$6400a8c0@Dell4500 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
MessageHi Theo,
There have been 2 major changes between the 7 and 8 versions that affect the coding in xml2. You need to edit the source code in order for it to compile properly on 7.
First, work_mem has to be changed to SortMem (line 666). I.e.
tupstore = tuplestore_begin_heap(true, false, work_mem);
should be changed to:
tupstore = tuplestore_begin_heap(true, SortMem);
Second, the error reporting framework has changed.
To fix this, you need to change all the ereport coding to use elog. I.e.
ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("xpath_table must be called as a table function")));
should be changed to:
elog(ERROR,"xpath_table must be called as a table function");
I have attached an edited copy of xpath.c with these changes, if you would like to work with it.
Regards,
George
----- Original Message -----
From: Theo Galanakis
To: 'pgsql-sql(at)postgresql(dot)org'
Sent: Sunday, February 20, 2005 11:28 PM
Subject: FW: [SQL] Working with XML.
Hi,
I have copied all the files manually from http://developer.postgresql.org/docs/pgsql/contrib/ for the xml2 contribution. However I have the following issue when I attempt to compile with gmake:
gcc -I/usr/include/libxml2 -fpic -I. -I../../src/include -D_GNU_SOURCE -c -o xpath.o xpath.c
xpath.c: In function `xpath_table':
xpath.c:689: `work_mem' undeclared (first use in this function)
xpath.c:689: (Each undeclared identifier is reported only once
xpath.c:689: for each function it appears in.)
gmake: *** [xpath.o] Error 1
I have installed :
libxml2-devel-2.5.10-1.rpm
What am I doing wrong, or can someone point me to the direction of a binary for XML2 on RedHat ES3, Postgres 7.4.5.
Cheers,
Theo
Attachment | Content-Type | Size |
---|---|---|
xpath.c | text/plain | 20.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew - Supernews | 2005-02-21 15:36:58 | Re: Timestamp with timezone question. |
Previous Message | Achilleus Mantzios | 2005-02-21 14:16:04 | Timestamp with timezone question. |