Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6HL6xa91949 for ; Tue, 17 Jul 2001 17:06:59 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f6HL6rX26548; Tue, 17 Jul 2001 17:06:54 -0400 (EDT) To: "Chris Ruprecht" cc: "p-sql" Subject: Re: PL/PGSQL and external (flat ASCII) files - Urgent ... :) In-reply-to: <015e01c10eff$0ea18400$5dd26383@corp.compucom.com> References: <015e01c10eff$0ea18400$5dd26383@corp.compucom.com> Comments: In-reply-to "Chris Ruprecht" message dated "Tue, 17 Jul 2001 15:28:36 -0500" Date: Tue, 17 Jul 2001 17:06:53 -0400 Message-ID: <26545.995404013@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200107/233 X-Sequence-Number: 4029 "Chris Ruprecht" writes: > I need to know how I can access a flat file from within a PL/PGSQL script. You can't --- and you should ask yourself hard questions about why your system design needs that, or whether the data in question shouldn't be inside the database to begin with. Among other problems, data in a flat file will not be under transactional control. That could cause such interesting problems as a transaction that logically precedes another one being able to see a later version of the flat file than the "later" transaction sees. If you are absolutely intent on doing this, you could use a function coded in C or in pltclu (unsecured pltcl). But there's no feature in plpgsql to do it, and requests for one are not likely to meet with much favor. regards, tom lane