Inserting file content into column

From: "Moravec Jan" <Jan(dot)Moravec(at)ips-ag(dot)cz>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Inserting file content into column
Date: 2006-06-06 00:05:02
Message-ID: D2BB392CF0C67542891FD639B93325761D1DED@pex2.corp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

Is there a built-in function that reads the contents of a (textual) file which could then be inserted into a given (varchar) column. What I am after is something like:

insert into cert ( cert_id,...., x509_data ) values ( nextval('seq_cert'), ...., load_file('./ca/mycert.pem') );

I need to do that from a DB init SQL script rather then from an application.

Thanks you,
Jan Moravec


Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Noel Faux 2006-06-06 00:43:29 Re: Inserting file content into column
Previous Message Tom Lane 2006-06-05 18:00:39 Re: Display large object from database