RE: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Robby Slaughter
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 pr

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Wei Weng
You can probably try to make a c extension that does open/close. On 17 Jul 2001 15:28:36 -0500, Chris Ruprecht wrote: > 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

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Tom Lane
"Chris Ruprecht" <[EMAIL PROTECTED]> 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 wit

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Peter Eisentraut
Chris Ruprecht writes: > I need to know how I can access a flat file from within a PL/PGSQL script. You can't. PL/TclU could help you there. -- Peter Eisentraut [EMAIL PROTECTED] http://funkturm.homeip.net/~peter ---(end of broadcast)--- T

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ...:)

2001-07-17 Thread Chris Ruprecht
Hi Tom, If life was easy, everything would just come in the format I'd like it. But since it isn't, I need to create records like this one: cdate| ctime | countrycode | areacodex | success | carrier | duration| phonenumber | areacode | pseq | loadno | frline | entity | loaddate | loa

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Tom Lane
Chris Ruprecht <[EMAIL PROTECTED]> writes: > If life was easy, everything would just come in the format I'd like it. But > since it isn't, I need to create records like this one: > ... > From an input file where the records looks like this one: If it's just a data import issue, why do you want to

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Josh Berkus
Chris, Hmmph. People are in a bad mood this week; obviously few other people on the list have had to write applications for the banking industry, which trades everything in flat files. Give Chris a break! > >From an input file where the records looks like this one: > > 020-13 016-05 07-15-200

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ...:)

2001-07-17 Thread Chris Ruprecht
Hi Josh, on 07/17/2001 18:31, Josh Berkus at [EMAIL PROTECTED] wrote: > Chris, > > Hmmph. People are in a bad mood this week; obviously few other people > on the list have had to write applications for the banking industry, > which trades everything in flat files. Give Chris a break! > Than

Re: [SQL] PL/PGSQL and external (flat ASCII) files - Urgent ... :)

2001-07-17 Thread Josh Berkus
Crhis, > Thanks ;). I'm new to PostGreSQL and to PHP and to SQL - I have done > Progress RDBMS/4GL for the last 12 years and it absolutely spoils > you. But > in the last 2 weeks, I have hammered out an application (you can have > a look > at http://chill-025.bbnow.net, use user demo and password