dbTalk Databases Forums  

xml2 on win32

comp.databases.postgresql comp.databases.postgresql


Discuss xml2 on win32 in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zeljko Peric
 
Posts: n/a

Default xml2 on win32 - 10-30-2008 , 04:24 AM






Hi all,

I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.

Thanks in advice,
Zeljko

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM






Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #8  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #9  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 07:49 AM



Zeljko Peric <deckic (AT) web (DOT) de> wrote:
Quote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.
Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe


Reply With Quote
  #10  
Old   
Zeljko Peric
 
Posts: n/a

Default Re: xml2 on win32 - 10-30-2008 , 08:23 AM



Laurenz Albe schrieb:
Quote:
Zeljko Peric <deckic (AT) web (DOT) de> wrote:
I have installed postgres 8.3 on windows vista. Unfortunately I did not
enabled xml2 support during the installation.
How can I add this functionality to the existing installation?
in contrib directory is no xml2 directory. only I have is xml2.dll in
bin birectory.

Do you really need xml2? In 8.3 there is XML support in core, and
the documentation says:

"It is planned that this module will be removed in PostgreSQL 8.4"

If you really want it, you will have to execute share/contrib/pgxml.sql
as superuser (I hope the names are the same on Windows).

Yours,
Laurenz Albe
Thank you Laurenz,

I did re-install of postgres server and I have enabled xml2 support
during the installation but it is still not available.
Probably does not work on windows.

I will continue to use the standard XML support in postgres.

I had also another issue:

I wanted to load xml file at once in text column with COPY function.
This is not possible. That is why I have created function to load and
xml file at once in an text variable.
Of course it works only as superuser.

it could be useful:

CREATE OR REPLACE FUNCTION load_xml(IN filepath text) RETURNS text AS
$BODY$
DECLARE
sql text;
xml_data text;
rec record;
BEGIN
sql := E'CREATE TEMPORARY TABLE TST_XML (xml_data text)';
EXECUTE sql;
sql := E'COPY TST_XML (xml_data) FROM E''' || $1 || '''';
--RAISE NOTICE '%', sql;
EXECUTE sql;

sql := E'SELECT xml_data FROM TST_XML';
xml_data := '';
FOR rec IN EXECUTE sql
LOOP
xml_data := xml_data || rec.xml_data;
END LOOP;
--RAISE NOTICE '%', xml_data;
sql := E'DROP TABLE TST_XML';
EXECUTE sql;
RETURN xml_data;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;

Thanks,
Zeljko





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.