Received: from mail.utexas.edu (wb2-a.mail.utexas.edu [128.83.126.136]) by postgresql.org (8.11.3/8.11.1) with SMTP id f6HKb1a80918 for ; Tue, 17 Jul 2001 16:37:01 -0400 (EDT) (envelope-from webmaster@robbyslaughter.com) Received: (qmail 4324 invoked by uid 0); 17 Jul 2001 20:36:58 -0000 Received: from adsl-64-218-163-131.dsl.austtx.swbell.net (HELO robmanbox) (64.218.163.131) by umbs-smtp-2 with SMTP; 17 Jul 2001 20:36:58 -0000 Reply-To: From: "Robby Slaughter" To: "Chris Ruprecht" , "p-sql" Subject: RE: PL/PGSQL and external (flat ASCII) files - Urgent ... :) Date: Tue, 17 Jul 2001 15:38:11 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-Mimeole: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <015e01c10eff$0ea18400$5dd26383@corp.compucom.com> X-Archive-Number: 200107/231 X-Sequence-Number: 4027 The hack and slash Perl programmer in me says--- if you only plan to do this once, (like importing data), then just write a Perl script that *generates* SQL code that does your inserts, updates, or whatever. You can then execute thsi with psql -f filename. But if you're trying to use flat files programmtically...(aren't you using a database to avoid flatfiles altogether? :-) hope that helps, robby -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Chris Ruprecht Sent: Tuesday, July 17, 2001 3:29 PM To: p-sql Subject: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :) Importance: High Hi all, I need to know how I can access a flat file from within a PL/PGSQL script. I have an Oracle PL/SQL book here and they refer to FOPEN(...), FCLOSE(...) but these functions don't seem to exist in PL/PGSQL.. What can I do instead? I checked the Programmer's Guide to Procedural Languages (PostGreSQL 7.1.2 and 7.2) but there is no info on it. Best regards, Chris _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl