loading a file into a field

From: Brian Sherwood <bdsher(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: loading a file into a field
Date: 2009-12-31 16:23:26
Message-ID: df8d2df50912310823p1d2e3fdu6496571484360be1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am looking to play around with the postgres XML functions, but can't
seem to find a way to load my data.

I have a number of XML files: file1.xml, file2.xml, etc.... All files
follow the same xml format (DTD?)

I would like to create the following table:

CREATE TABLE configs (
filename varchar(80) PRIMARY KEY,
config xml
);

and load each file into the xml field, but can't seem to find a way.
(I think I need something similiar to lo_import, but have not found anything)

Any help is appreciated.

Thanks

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rosser Schwarz 2009-12-31 16:23:49 Re: Using || operator to fold multiple columns into one
Previous Message Chris Browne 2009-12-30 21:20:43 Re: PSQL statement to delete 100 rows meeting certain criteria