pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robby Slaughter <webmaster@robbyslaughter.com>
To: Chris Ruprecht <chrup999@yahoo.com>
To: p-sql <pgsql-sql@postgresql.org>
Subject: RE: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
Date: Tue, 17 Jul 2001 15:38:11 -0500
Message-ID: <EPEHLKLEHAHLONFOKNHNCEPHDCAA.webmaster@robbyslaughter.com> (raw)
In-Reply-To: <015e01c10eff$0ea18400$5dd26383@corp.compucom.com>

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




view thread (10+ messages)  latest in thread

Message-ID: <EPEHLKLEHAHLONFOKNHNCEPHDCAA.webmaster@robbyslaughter.com>
Permalink:  ../EPEHLKLEHAHLONFOKNHNCEPHDCAA.webmaster@robbyslaughter.com/
Also on:    postgresql.org/message-id/EPEHLKLEHAHLONFOKNHNCEPHDCAA.webmaster@robbyslaughter.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: webmaster@robbyslaughter.com, chrup999@yahoo.com
  Subject: RE: PL/PGSQL and external (flat ASCII) files - Urgent ... :)
  In-Reply-To: <EPEHLKLEHAHLONFOKNHNCEPHDCAA.webmaster@robbyslaughter.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox