I use DBD/DBI in perl. use DBI; my $dbh = DBI->connect("dbi:Pg:dbname=YourDatabase;host=localhost",'username','passwor d'); my $sth = $dbh->prepare("select * from my_view"); $sth->execute; my @row; while (@ row = $sth->fetchrow_array) { print join("\t",@row); #or whatever } $sth->finish; $dbh->disconnect; I'm sure the other postgres/perl interfaces have similar capabilities. --rob ----- Original Message ----- From: "Steve Heaven" <[EMAIL PROTECTED]> To: "rob" <[EMAIL PROTECTED]> Sent: Wednesday, December 13, 2000 2:35 AM Subject: Re: COPY doesnt work on views > At 23:55 12/12/00 -0500, you wrote: > >Try "\o somefile" , then run select & from your_view. See also \pset > > > > Yes I know that I can do it from psql, but I want to achieve the same thing > from a Perl CGI script. > > Steve > > -- > thorNET - Internet Consultancy, Services & Training > Phone: 01454 854413 > Fax: 01454 854412 > http://www.thornet.co.uk >