pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedloading a file into a field
2+ messages / 2 participants
[nested] [flat]
* loading a file into a field
@ 2009-12-31 16:23 Brian Sherwood <bdsher@gmail.com>
2009-12-31 18:15 ` Re: loading a file into a field Tim Landscheidt <tim@tim-landscheidt.de>
0 siblings, 1 reply; 2+ messages in thread
From: Brian Sherwood @ 2009-12-31 16:23 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: loading a file into a field
2009-12-31 16:23 loading a file into a field Brian Sherwood <bdsher@gmail.com>
@ 2009-12-31 18:15 ` Tim Landscheidt <tim@tim-landscheidt.de>
0 siblings, 0 replies; 2+ messages in thread
From: Tim Landscheidt @ 2009-12-31 18:15 UTC (permalink / raw)
To: pgsql-sql
Brian Sherwood <bdsher@gmail.com> wrote:
> 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)
There is no function to do that in the standard distribu-
tion. You have to solve that in your client application.
Theoretically, you could try to do it in a server-side user
function, but permissions, local vs. remote file systems &
Co. usually only create major headaches.
Tim
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2009-12-31 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-12-31 16:23 loading a file into a field Brian Sherwood <bdsher@gmail.com>
2009-12-31 18:15 ` Tim Landscheidt <tim@tim-landscheidt.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox