Re: procedure to load xml file data in postgesql

Поиск
Список
Период
Сортировка
От Stephane Bortzmeyer
Тема Re: procedure to load xml file data in postgesql
Дата
Msg-id 20080727095848.GA16735@laperouse.bortzmeyer.org
обсуждение исходный текст
Ответ на procedure to load xml file data in postgesql  (aravind chandu <avin_friends@yahoo.com>)
Список pgsql-general
On Sat, Jul 26, 2008 at 02:32:05PM -0700,
 aravind chandu <avin_friends@yahoo.com> wrote
 a message of 149 lines which said:

>             I have to load xml file data into postgresql database
>             table using a stored procedure,but I didn't have any
>             idea how to start it.

Well, the problem is much too open to provide any ready-to-use
solution. The way you describe it, it looks like a school
assignment. Is it so?

First, you need to decide what the XML data will look like in
PostgreSQL:

* you can slurp the entire file in a TEXT field (the simplest
solution),

* you can convert it to relational data (the schema conversion is not
obvious because XML data model is hierarchical, not relational, but
this solution will give you "nice" SQL data; your actual data look
quite tabular and therefore will fit well in a relational schema)

* you can use PostgreSQL native XML facilities (I cannot help, I've
never used them).
<http://developer.postgresql.org/pgdocs/postgres/datatype-xml.html>
and <http://developer.postgresql.org/pgdocs/postgres/functions-xml.html>



В списке pgsql-general по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Problems Restarting PostgreSQL Daemon
Следующее
От: aravind chandu
Дата:
Сообщение: Getting data from Xml to Postgresql database