"Chris Ruprecht" <chrup999@yahoo.com> 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