Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5E2786326A5 for ; Thu, 31 Dec 2009 12:23:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53146-09 for ; Thu, 31 Dec 2009 16:23:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mail.postgresql.org (Postfix) with ESMTP id 9F4C1632D3E for ; Thu, 31 Dec 2009 12:23:27 -0400 (AST) Received: by ewy26 with SMTP id 26so10497201ewy.3 for ; Thu, 31 Dec 2009 08:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=/WMpNwR4SI1wUs92gIzinpMAu5d2XM+zbUHougiaVas=; b=DHzDYguYVoYWMSe850jCIJHwX7Dn5Q+PPdFL+9CSI4th7saGcUWKJ8dlu0G5qHbV1S T+QO/tb6gJwmO0g0CjefAYH2gk1jf4PFijv416gPmWHpK2aA7TQzaenbCJkGQ328mbcx TY+0cP4WE7/BZZ7ybuufMXzqbWl+ZvHKCyi4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xPbB9M5oU/m5AvSkUo5FJTf3+8YQgr6XgqipUpYzWTodggypfboh2PKxKC5d0gI18d FjtHZ7eqvkw4a9WJd4M03G7E/dSBrQ1sRU3kNHlExj0Ai6/4BKTXm7/se3rwLWQ5gT29 QV7jHNkTDRdZAXNeJnMu00Fywf0JfTNUfp+fo= MIME-Version: 1.0 Received: by 10.213.39.129 with SMTP id g1mr7115636ebe.36.1262276606149; Thu, 31 Dec 2009 08:23:26 -0800 (PST) Date: Thu, 31 Dec 2009 11:23:26 -0500 Message-ID: Subject: loading a file into a field From: Brian Sherwood To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/91 X-Sequence-Number: 33529 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